UEFI syntax for fstab

Forum rules
Before you post please read this
Post Reply
richard-g8jvm
Level 3
Level 3
Posts: 168
Joined: Fri Jul 26, 2013 12:46 pm

UEFI syntax for fstab

Post by richard-g8jvm » Thu May 23, 2019 4:51 pm

my current fdisk -l shows

Code: Select all

richard@richard-MS-7A40:~$ sudo fdisk -l
Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 137FAF0A-53EE-4070-AF6A-B280CFFE743B

Device         Start       End   Sectors  Size Type
/dev/sda1       2048   1050623   1048576  512M EFI System
/dev/sda2    1050624 164890467 163839844 78.1G Linux filesystem
/dev/sda3  164890624 468860927 303970304  145G Linux filesystem


Disk /dev/sdb: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8b2539a7

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdb1        2048 234440703 234438656 111.8G 83 Linux



/dev/sdb is new and nothing on it
I like to use EFI on both drives
/etc/fstab

Code: Select all

richard@richard-MS-7A40:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=5e98e14b-725f-4e06-a12c-f954bdd917d7 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=753A-83BB  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sda3 during installation
UUID=e2f39b87-bf79-43e4-ba4e-cc7066a50f5e /home           ext4    defaults        0       2
/swapfile                                 none            swap    sw              0       0

I know how to just add /dev/sdb to the fstab

But how do you add the drive
blkid shows

Code: Select all

/dev/sdb1: LABEL="drive2" UUID="eb683b41-f12a-40a7-9df3-0b5b648fabb9" TYPE="ext4" PARTUUID="8b2539a7-01"
I could do with some guidance as fstab is the last file I want to screw up

Thanks

User avatar
WharfRat
Level 21
Level 21
Posts: 13142
Joined: Thu Apr 07, 2011 8:15 pm

Re: UEFI syntax for fstab

Post by WharfRat » Thu May 23, 2019 5:28 pm

I'm not really following you about how to just add /dev/sdb :?

You would use its partition UUID eb683b41-f12a-40a7-9df3-0b5b648fabb9 which is listed with blkid.

Create a mountpoint for the partition like /media/drive2 and use that for fstab's mountpoint.

Always make a copy of a file before doing any modifications :wink:
ImageImage

richard-g8jvm
Level 3
Level 3
Posts: 168
Joined: Fri Jul 26, 2013 12:46 pm

Re: UEFI syntax for fstab

Post by richard-g8jvm » Fri May 24, 2019 4:25 am

the clue was in the title

I apologise for asking a question which is considered a waste of time
The answer would have been useful to others ,

jglen490
Level 5
Level 5
Posts: 642
Joined: Sat Jul 15, 2017 9:57 pm

Re: UEFI syntax for fstab

Post by jglen490 » Sat Jun 01, 2019 11:32 pm

richard-g8jvm wrote:
Thu May 23, 2019 4:51 pm
my current fdisk -l shows

Code: Select all

richard@richard-MS-7A40:~$ sudo fdisk -l
Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 137FAF0A-53EE-4070-AF6A-B280CFFE743B

Device         Start       End   Sectors  Size Type
/dev/sda1       2048   1050623   1048576  512M EFI System
/dev/sda2    1050624 164890467 163839844 78.1G Linux filesystem
/dev/sda3  164890624 468860927 303970304  145G Linux filesystem


Disk /dev/sdb: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8b2539a7

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdb1        2048 234440703 234438656 111.8G 83 Linux



/dev/sdb is new and nothing on it
I like to use EFI on both drives
/etc/fstab

Code: Select all

richard@richard-MS-7A40:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=5e98e14b-725f-4e06-a12c-f954bdd917d7 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=753A-83BB  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/sda3 during installation
UUID=e2f39b87-bf79-43e4-ba4e-cc7066a50f5e /home           ext4    defaults        0       2
/swapfile                                 none            swap    sw              0       0

I know how to just add /dev/sdb to the fstab

But how do you add the drive
blkid shows

Code: Select all

/dev/sdb1: LABEL="drive2" UUID="eb683b41-f12a-40a7-9df3-0b5b648fabb9" TYPE="ext4" PARTUUID="8b2539a7-01"
I could do with some guidance as fstab is the last file I want to screw up

Thanks
You don't need to put an EFI directory on the /dev/sdb1 drive. Just reference the /dev/sdb1 by using its UUID in the fstab file.

Essentially you will edit fstab and duplicate the lines for /dev/sda3, as depicted below. Edit fstab in a terminal:

Code: Select all

sudo nano /etc/fstab
which will open fstab in the nano editor. Move your cursor down, with the arrow keys, to the front of the /swap line and hit the Enter key twice. That will place two empty lines between /swap and the line originally above it. Move your cursor up twice, so its at the beginning of the blank line. Paste these two lines in the blank lines:

Code: Select all

# Added /dev/sdb1
UUID=eb683b41-f12a-40a7-9df3-0b5b648fabb9 /media/drive2           ext4    defaults        0       2
That UUID came from the blkid query. Then write the file (CTL-w), answer the prompt, and exit (CTL-x).
I feel more like I do than I did when I got here.
Toshiba A135-S2386, Intel T2080, ATI Radeon® Xpress 200M Chipset, 2GB RAM, 500GB

gm10
Level 19
Level 19
Posts: 9218
Joined: Thu Jun 21, 2018 5:11 pm

Re: UEFI syntax for fstab

Post by gm10 » Sun Jun 02, 2019 12:12 am

richard-g8jvm wrote:
Fri May 24, 2019 4:25 am
the clue was in the title
UEFI has got nothing to do with mounting your partitions. That's why your title is correctly getting ignored. ;)
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

richard-g8jvm
Level 3
Level 3
Posts: 168
Joined: Fri Jul 26, 2013 12:46 pm

Re: UEFI syntax for fstab

Post by richard-g8jvm » Sun Jun 02, 2019 4:56 am

Thanks jglen490,
that was the type of reply i was hoping for.
Unlike the flames before and after.
There does seem to be a tendancy on this list now to flame anyone , instead of answering a question, and done by those who should know better.

gm10
Level 19
Level 19
Posts: 9218
Joined: Thu Jun 21, 2018 5:11 pm

Re: UEFI syntax for fstab

Post by gm10 » Sun Jun 02, 2019 8:12 am

So being politely corrected is getting flamed to you? :shock: To each their own, I suppose. I'll block you or I'd risk "flaming" you again at some point, and I have no intention of doing so. Enjoy your Sunday!
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

rene
Level 12
Level 12
Posts: 4167
Joined: Sun Mar 27, 2016 6:58 pm

Re: UEFI syntax for fstab

Post by rene » Sun Jun 02, 2019 8:34 am

Just for the sake of clarity; was a post moderated out between Wharfrat's second and poster's third? If so I feel it would've been kinder to poster to leave in whatever he was called in a now moderated out post then have him come across as he does now to readers who didn't see that post...
Last edited by rene on Sun Jun 02, 2019 12:28 pm, edited 1 time in total.

jglen490
Level 5
Level 5
Posts: 642
Joined: Sat Jul 15, 2017 9:57 pm

Re: UEFI syntax for fstab

Post by jglen490 » Sun Jun 02, 2019 8:53 am

richard-g8jvm wrote:
Sun Jun 02, 2019 4:56 am
Thanks jglen490,
that was the type of reply i was hoping for.
Unlike the flames before and after.
There does seem to be a tendancy on this list now to flame anyone , instead of answering a question, and done by those who should know better.
You're welcome.

Actually, the title of your post, while maybe not technically precise was the reason for looking at the post and for the answer to you.

Are you able to make use of that answer?
I feel more like I do than I did when I got here.
Toshiba A135-S2386, Intel T2080, ATI Radeon® Xpress 200M Chipset, 2GB RAM, 500GB

richard-g8jvm
Level 3
Level 3
Posts: 168
Joined: Fri Jul 26, 2013 12:46 pm

Re: UEFI syntax for fstab

Post by richard-g8jvm » Sun Jun 02, 2019 9:21 am

Yes I was able to use it, thanks
The machine its is used on is a real PITA.
Ryzen 3500 with graphics built in and a B450-i chip set.
I'm having to use kernel 4.17 to support that board.
The second SSD was bought so that I could load winblows as I have a piece of hardware which wont function with linux.
But you cant load anything earlier than win10 on it, which I really hate, it took ages to get it off this laptop,
so the second SSD was used to expand the storage on linux.
when say PITA I mean it, it doesn't alway boot, I'm using HDMI , 19" TV as a monitor, and unless that port is up the boot fails,
and then it will often fail to set the wanted screen resolution.

jglen490
Level 5
Level 5
Posts: 642
Joined: Sat Jul 15, 2017 9:57 pm

Re: UEFI syntax for fstab

Post by jglen490 » Sun Jun 02, 2019 10:17 am

So, recommend you take those other problems - one at a time - and start other posts. Maybe start with the monitor/TV problem.
I feel more like I do than I did when I got here.
Toshiba A135-S2386, Intel T2080, ATI Radeon® Xpress 200M Chipset, 2GB RAM, 500GB

richard-g8jvm
Level 3
Level 3
Posts: 168
Joined: Fri Jul 26, 2013 12:46 pm

Re: UEFI syntax for fstab

Post by richard-g8jvm » Sun Jun 02, 2019 11:19 am

It'll be more prudent to hang on until kernel 4.17 becomes mainstream,
mosty of the the time it will boot in to the required resolution, if not reboot until it behaves.
All you get is the comments that you are not running a supported kernel , and flames :(

been there when I bought the mobo and cpu. that was last year.

jglen490
Level 5
Level 5
Posts: 642
Joined: Sat Jul 15, 2017 9:57 pm

Re: UEFI syntax for fstab

Post by jglen490 » Sun Jun 02, 2019 2:44 pm

which version of Mint are you running right now?

Code: Select all

inxi -S
I feel more like I do than I did when I got here.
Toshiba A135-S2386, Intel T2080, ATI Radeon® Xpress 200M Chipset, 2GB RAM, 500GB

richard-g8jvm
Level 3
Level 3
Posts: 168
Joined: Fri Jul 26, 2013 12:46 pm

Re: UEFI syntax for fstab

Post by richard-g8jvm » Sun Jun 02, 2019 4:26 pm

Why did you want sensor data for ?
both laptop and the beast machine are running LM19.1, the ARM boards are running ubuntu18.04
One major problem now is I cant log into it, looks like the password has got screwed
Cant get in remotely, SSH, and nothing needing root acess is allowed.
Probably screwed from multiple rebooting when it hung mid way through its startup, the only exit that workss at that point is
to power cycle.

jglen490
Level 5
Level 5
Posts: 642
Joined: Sat Jul 15, 2017 9:57 pm

Re: UEFI syntax for fstab

Post by jglen490 » Sun Jun 02, 2019 4:45 pm

Nope, upper case "S" - gives general system info, similar to this:

Code: Select all

ohn@john-Desktop:~$ inxi -S
System:    Host: john-Desktop Kernel: 4.18.0-20-generic x86_64 bits: 64
           Desktop: KDE Plasma 5.12.7 Distro: Ubuntu 18.04.2 LTS
I feel more like I do than I did when I got here.
Toshiba A135-S2386, Intel T2080, ATI Radeon® Xpress 200M Chipset, 2GB RAM, 500GB

richard-g8jvm
Level 3
Level 3
Posts: 168
Joined: Fri Jul 26, 2013 12:46 pm

Re: UEFI syntax for fstab

Post by richard-g8jvm » Sun Jun 02, 2019 5:07 pm

OK, noted

Still LM19.1 , rebooted again and this time it let me in, so I quickly created another user with a very short passwd.
But its as touchy as hell on boot up, if it cant find the HDMI port it hangs, and it doesn't look very hard.

jglen490
Level 5
Level 5
Posts: 642
Joined: Sat Jul 15, 2017 9:57 pm

Re: UEFI syntax for fstab

Post by jglen490 » Sun Jun 02, 2019 7:01 pm

My reason for entering inxi into the conversation, is that it is an incredibly useful utility for examining your platform. The usual starting point for chasing down problems is to have a user enter

Code: Select all

inxi -Fxx
. Beyond that it's possible to narrow the focus to some sub-component with different options.

Code: Select all

inxi --help
lists all the options with a brief explanation as does

Code: Select all

man inxi
.
I feel more like I do than I did when I got here.
Toshiba A135-S2386, Intel T2080, ATI Radeon® Xpress 200M Chipset, 2GB RAM, 500GB

Post Reply

Return to “Mounting Partitions”