View previous topic :: View next topic |
Author |
Message |
Nilangshu n00b
Joined: 27 Feb 2021 Posts: 13
|
Posted: Tue May 04, 2021 12:06 pm Post subject: Can't use UUID of my partitions in fstab |
|
|
I have a strange problem. I have working gentoo system but when I define partitions in FSTAB (Filesystem tab), it fails to boot as depend phase timeout while looking for partitions. But when I use device nodes such as /dev/sdaX then it work without any problem. Is my hard disk is failing that is the reason? Please help. |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Tue May 04, 2021 12:15 pm Post subject: |
|
|
Hi if you need uuid naming for "/" then please use an initrd.
I think this happens because getting uuid names requires blkid or some other userspace utility which is impossible before mounting "/" _________________
|
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Tue May 04, 2021 12:26 pm Post subject: |
|
|
If alamahant's answer doesn't help, then post your /etc/fstab and the output of 'blkid', please. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54214 Location: 56N 3W
|
Posted: Tue May 04, 2021 2:06 pm Post subject: |
|
|
Nilangshu,
Check your fstab format.
Code: | UUID=8d5d5691-ceb7-4e58-bed3-28803cb88bfe /home ext4 noatime 1 2 | works for my /home.
blkid: | /dev/sde1: UUID="c400b18c-0210-4338-a0fd-f437ecbaaf99" BLOCK_SIZE="1024" TYPE="ext4" PARTLABEL="ext4" PARTUUID="150e6ef1-7ba8-409c-9c3f-dbdecdc9f18b" |
Don't mix up the UUID, whicd is a property of the filesystem with the PARTUUID= which is a property of the partition holding the filesystem.
fstab can work with either.
As fstab cannot be read until after root is mounted, is safe to use either for root in fstab.
On the kernel command line, the device or root=PARTUUID= works but root=UUID needs an initrd to dig the UUIDs of of the filesystems. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Spanik l33t
Joined: 12 Dec 2003 Posts: 942 Location: Belgium
|
Posted: Tue May 18, 2021 8:05 pm Post subject: |
|
|
I never use an initrd and do use UUID for / (and /root on the other pc). Only issue I ever had was that I had to use PARTUUID for a vfat /boot because that did not work with UUID for some reason. My fstab looks like this:
Code: | PARTUUID=af5d23da-97e8-4ee7-9e99-864b7cffd077 /boot vfat noauto,noatime 0 2
UUID=5ee9cd8c-daba-48eb-ac2f-ccbb755fc5b5 none swap sw 0 0
UUID=65b3e5eb-04b2-4cf8-9a6a-61e6ad938397 / xfs noatime 0 1
UUID=5961004a-94f5-4c20-9746-7c721d22e6ec /mnt/main_data xfs noatime,rw,exec,suid 0 1
UUID=94063aea-cfd4-4f05-9228-f10ba1c08ae2 /mnt/rommel xfs noatime,rw,exec,suid 0 1
UUID=cf9c0169-59c9-4c28-9d8c-d7a77b3897ca /mnt/mail xfs noatime 0 1
UUID=377e334b-7a76-43f2-b5a9-587cd1caabed /mnt/virtual_machines xfs noatime,rw,exec,suid 0 1
UUID=72be5ad8-5040-4a90-b89e-3bc934e71728 /mnt/data xfs noatime,rw,exec,suid 0 1 |
_________________ Expert in non-working solutions |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue May 18, 2021 10:22 pm Post subject: |
|
|
Spanik wrote: | Only issue I ever had was that I had to use PARTUUID for a vfat /boot because that did not work with UUID for some reason. |
This is the reason:
NeddySeagoon wrote: | Don't mix up the UUID, which is a property of the filesystem with the PARTUUID= which is a property of the partition holding the filesystem. | The BIOS doesn't know about filesystems (except Fat & ntfs and it knows little about ntfs) |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4124 Location: Bavaria
|
Posted: Tue May 18, 2021 10:44 pm Post subject: Re: Can't use UUID of my partitions in fstab |
|
|
Nilangshu wrote: | Is my hard disk is failing that is the reason? Please help. |
No. Probably you have a syntax error in your fstab.
Nilangshu wrote: | I have a strange problem. I have working gentoo system but when I define partitions in FSTAB (Filesystem tab), it fails to boot as depend phase timeout while looking for partitions. But when I use device nodes such as /dev/sdaX then it work without any problem. |
1. If your disk is partitioned with "GPT", then you can use in your fstab:
- UUID
- PARTUUID
- PARTLABEL (but NOT LABEL)
An example from my fstab:
Code: | PARTLABEL=boot /boot vfat defaults,noauto,noatime 1 2 |
2. If your disk is partitioned as "MBR", then you can use in your fstab:
- UUID
- LABEL (but NOT PARTLABEL)
- I am not sure about PARTUUID (I dont have any MBR since many years)
In all cases you dont need an initramfs. In all cases you DONT use inverted comma.
If you want to give your kernel the information which is the root partition (kernel command line), you can use:
root=/dev/....
root=PARTUUID=
root=PARTLABEL=
In all cases you DONT use inverted comma.
P.S.: Just look into your /dev/disk
Code: | /dev/disk # ls -l
insgesamt 0
drwxr-xr-x 2 root root 400 18. Mai 10:42 by-id
drwxr-xr-x 2 root root 160 18. Mai 10:42 by-partlabel
drwxr-xr-x 2 root root 160 18. Mai 10:42 by-partuuid
drwxr-xr-x 2 root root 160 18. Mai 10:42 by-uuid |
|
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue May 18, 2021 11:56 pm Post subject: Re: Can't use UUID of my partitions in fstab |
|
|
pietinger wrote: |
1. If your disk is partitioned with "GPT", then you can use in your fstab:
- UUID
- PARTUUID
- PARTLABEL (but NOT LABEL)
An example from my fstab:
Code: | PARTLABEL=boot /boot vfat defaults,noauto,noatime 1 2 |
2. If your disk is partitioned as "MBR", then you can use in your fstab:
- UUID
- LABEL (but NOT PARTLABEL)
- I am not sure about PARTUUID (I dont have any MBR since many years)
|
Code: | $ cat /etc/fstab |grep -v ^#
LABEL=CT500MX_EFI /boot/efi vfat relatime 1 2
LABEL=CT500MX_PART2 / ext4 relatime 0 1
LABEL=SAGE_VIDEO /video ext4 auto,relatime 0 1
/dev/sr0 /mnt/cdrom auto user,noauto,nofail 0 0
tmpfs /tmp tmpfs rw,nosuid,noatime,nodev,size=20G,mode=1777 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
LABEL=P1-1TB /mnt/freegentoo ext4 relatime,noauto 0 1
LABEL=P2-1TB /mnt/custom ext4 relatime,noauto 0 1
LABEL=P3-1TB /home/tony/.VirtualBox ext4 relatime,auto 0 1
| gpt |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|