Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

Can't use UUID of my partitions in fstab

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
Nilangshu
n00b
n00b
User avatar
Posts: 13
Joined: Sat Feb 27, 2021 2:25 pm

Can't use UUID of my partitions in fstab

  • Quote

Post by Nilangshu » Tue May 04, 2021 12:06 pm

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 :roll: :roll: that is the reason? Please help.
Top
alamahant
Advocate
Advocate
Posts: 4032
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Tue May 04, 2021 12:15 pm

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 "/"
:)
Top
mike155
Advocate
Advocate
Posts: 4438
Joined: Fri Sep 17, 2010 11:33 pm
Location: Frankfurt, Germany

  • Quote

Post by mike155 » Tue May 04, 2021 12:26 pm

If alamahant's answer doesn't help, then post your /etc/fstab and the output of 'blkid', please.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56088
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue May 04, 2021 2:06 pm

Nilangshu,

Check your fstab format.

Code: Select all

UUID=8d5d5691-ceb7-4e58-bed3-28803cb88bfe  /home                    ext4  noatime         1 2
works for my /home.

Code: Select all

/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.
Top
Spanik
Veteran
Veteran
Posts: 1170
Joined: Fri Dec 12, 2003 9:10 pm
Location: Belgium

  • Quote

Post by Spanik » Tue May 18, 2021 8:05 pm

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: Select all

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
Top
Tony0945
Watchman
Watchman
Posts: 5127
Joined: Tue Jul 25, 2006 12:19 am
Location: Illinois, USA

  • Quote

Post by Tony0945 » Tue May 18, 2021 10:22 pm

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)
Top
pietinger
Administrator
Administrator
Posts: 6621
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

Re: Can't use UUID of my partitions in fstab

  • Quote

Post by pietinger » Tue May 18, 2021 10:44 pm

Nilangshu wrote:Is my hard disk is failing :roll: :roll: 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: Select all

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: Select all

 /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
Top
Tony0945
Watchman
Watchman
Posts: 5127
Joined: Tue Jul 25, 2006 12:19 am
Location: Illinois, USA

Re: Can't use UUID of my partitions in fstab

  • Quote

Post by Tony0945 » Tue May 18, 2021 11:56 pm

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: Select all

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: Select all

 $ 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
Top
Post Reply

8 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic