View previous topic :: View next topic |
Author |
Message |
Vieri l33t
Joined: 18 Dec 2005 Posts: 874
|
Posted: Fri Oct 01, 2021 6:46 am Post subject: [SOLVED] boot device cannot be mounted |
|
|
Hi,
Recently installed and booted Gentoo system cannot mount boot:
Code: | # cat /etc/fstab
/dev/vgroot/root / ext4 noatime 0 1
/dev/sdc3 /boot ext2 noauto,noatime 1 2
/dev/sdc2 /boot/efi vfat noauto,noatime 1 2
/dev/sdc4 none swap sw 0 0
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
tmpfs /tmp tmpfs size=4G,noatime 0 0
tmpfs /var/tmp tmpfs size=12G,noatime 0 0
# mount /boot
mount: /boot: /dev/sdc3 already mounted or mount point busy.
# mount | grep boot |
How can I find out who or what is preventing me from mounting the boot partition?
Regards,
Vieri
Last edited by Vieri on Fri Oct 01, 2021 2:37 pm; edited 1 time in total |
|
Back to top |
|
|
Goverp Veteran
Joined: 07 Mar 2007 Posts: 1997
|
Posted: Fri Oct 01, 2021 8:05 am Post subject: Re: boot device cannot be mounted |
|
|
Vieri wrote: | Hi,
Recently installed and booted Gentoo system cannot mount boot:
Code: | # cat /etc/fstab
/dev/vgroot/root / ext4 noatime 0 1
/dev/sdc3 /boot ext2 noauto,noatime 1 2
/dev/sdc2 /boot/efi vfat noauto,noatime 1 2
/dev/sdc4 none swap sw 0 0
proc /proc proc defaults 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
tmpfs /tmp tmpfs size=4G,noatime 0 0
tmpfs /var/tmp tmpfs size=12G,noatime 0 0
# mount /boot
mount: /boot: /dev/sdc3 already mounted or mount point busy.
# mount | grep boot |
How can I find out who or what is preventing me from mounting the boot partition?
Regards,
Vieri |
_________________ Greybeard |
|
Back to top |
|
|
Vieri l33t
Joined: 18 Dec 2005 Posts: 874
|
Posted: Fri Oct 01, 2021 8:28 am Post subject: |
|
|
No luck.
Neither
nore
Code: | mount | grep '/dev/sd' |
show anything.
The only device shown by mount from fstab is vgroot root in /dev/mapper.
So I'm puzzled as to why /dev/sdc3 is "busy". |
|
Back to top |
|
|
Vieri l33t
Joined: 18 Dec 2005 Posts: 874
|
Posted: Fri Oct 01, 2021 8:57 am Post subject: |
|
|
Even lsof doesn't show anything on sdc3.
dmesg outputs nothing related to sdc3.
I'm having the same issue with the swap partition.
This outputs nothing:
dmesg does not say anything about swap.
Any more ideas? |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Fri Oct 01, 2021 9:13 am Post subject: |
|
|
Try plz with
Code: |
/dev/sdc3 /boot ext2 noauto,noatime 0 2
|
see
man fstab
concerning the "fifth field" ie dumping. _________________
|
|
Back to top |
|
|
Vieri l33t
Joined: 18 Dec 2005 Posts: 874
|
Posted: Fri Oct 01, 2021 9:44 am Post subject: |
|
|
Thanks, but I think the problem is elsewhere.
When I installed from the Gentoo live medium, the target disk partitions I selected for both boot and swap were /dev/sdc3 and /dev/sdc4. Everything was correct. LVM vgroot was also configured by using the device number.
However, when I rebooted without the live medium (from hard disk) it seems that the "dev/sd" ordering changed. In fact, what was /dev/sdc in the live medium is now /dev/sdb. I reflected that in /etc/fstab and rebooted. It is now OK (both boot and swap).
However, I'm now worried about the root partition.
I see that it's now in "sdb" instead of "sdc" which would be coherent with the reordering behavior.
Code: | # pvdisplay
--- Physical volume ---
PV Name /dev/sdb5
VG Name vgroot
PV Size <857.96 GiB / not usable <1.34 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 219637
Free PE 0
Allocated PE 219637
PV UUID UQYLvT-BwKb-MQsi-6Lpf-956h-kXdQ-o1vAR3 |
However, an fdisk listing shows that the root partition is not of type Linux LVM. Shouldn't it be?
Code: | # fdisk /dev/sdb
Welcome to fdisk (util-linux 2.36.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sdb: 894.25 GiB, 960197124096 bytes, 1875385008 sectors
Disk model: INTEL SSDSC2KB96
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 516EB7A3-E4B9-43B8-A005-DDC3BF3E4E17
Device Start End Sectors Size Type
/dev/sdb1 2048 6143 4096 2M BIOS boot
/dev/sdb2 6144 1054719 1048576 512M EFI System
/dev/sdb3 1054720 2103295 1048576 512M Linux filesystem
/dev/sdb4 2103296 76113919 74010624 35.3G Linux swap
/dev/sdb5 76113920 1875382959 1799269040 858G Linux filesyste |
To avoid all this maybe I should use disk UIDs during live medium installation, right?
I'm not sure the official handbook deals with UIDs in fstab. I wonder if anyone knows of a quick guide to uniquely identify partitions when installing. |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Fri Oct 01, 2021 9:52 am Post subject: |
|
|
If you run
lsblk -f
do you see something like
Code: |
├─sdb4 LVM2_m LVM2 2xTZvp-dr5l-vGm5-ioto-4Sry-sPiI-vqhqqu
|
for your physical volume partition?
Yes you can use either UUID which is userspace or PARTUUID which is kernel space.
Remember to rebuild initrd and update grub. _________________
|
|
Back to top |
|
|
Vieri l33t
Joined: 18 Dec 2005 Posts: 874
|
Posted: Fri Oct 01, 2021 10:33 am Post subject: |
|
|
OK, yes, I see that lsblk is clearer.
Code: | # lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
sda
├─sda1 linux_raid_member c029c11e-4337-6d29-cb20-1669f728008a
│ └─md127
├─sda2 vfat 2884-CE48
├─sda3 linux_raid_member 651578bb-7320-699c-cb20-1669f728008a
│ └─md126 ext2 0842471e-0bd0-4cab-8621-83999f2cc519
├─sda4 linux_raid_member 8578cf64-d682-663d-cb20-1669f728008a
│ └─md125 swap 5f569201-8e47-4fe9-9cc7-f61d2ee9af7c
└─sda5 linux_raid_member 17463d48-0a02-0b98-cb20-1669f728008a
└─md124 ext4 fd623a56-634b-496a-9411-fce182f6f105
sdb
├─sdb1
├─sdb2 vfat EFA9-D909
├─sdb3 ext2 0b108998-dc95-4d90-9971-44289da5f53f
├─sdb4 swap 1651ba86-ae24-4d71-b304-e98162b7fa34 [SWAP]
└─sdb5 LVM2_member UQYLvT-BwKb-MQsi-6Lpf-956h-kXdQ-o1vAR3
└─vgroot-root ext4 453a2760-56d3-45cc-ae42-9d13607afbd8 777G 3% /
sdc
├─sdc1 linux_raid_member c029c11e-4337-6d29-cb20-1669f728008a
│ └─md127
├─sdc2 vfat 2885-144F
├─sdc3 linux_raid_member 651578bb-7320-699c-cb20-1669f728008a
│ └─md126 ext2 0842471e-0bd0-4cab-8621-83999f2cc519
├─sdc4 linux_raid_member 8578cf64-d682-663d-cb20-1669f728008a
│ └─md125 swap 5f569201-8e47-4fe9-9cc7-f61d2ee9af7c
└─sdc5 linux_raid_member 17463d48-0a02-0b98-cb20-1669f728008a
└─md124 ext4 fd623a56-634b-496a-9411-fce182f6f105
sdd
├─sdd1
├─sdd2
├─sdd3
├─sdd4
└─sdd5
|
So, if I wanted to use PARTUUID=xxxx in /etc/fstab, how would I go about doing that fro the live medium?
Should I just run blkid /dev/sd?? and use the PARTUUID value in the target system's fstab?
Something like:
Code: | PARTUUID="whatever" /boot ext2 noauto,noatime 1 2 |
right?
Is it better to use UUID or PARTUUID? (I think all of my disks use gpt) |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Fri Oct 01, 2021 10:38 am Post subject: |
|
|
Quote: |
So, if I wanted to use PARTUUID=xxxx in /etc/fstab, how would I go about doing that fro the live medium?
Should I just run blkid /dev/sd?? and use the PARTUUID value in the target system's fstab?
Something like:ot r
Code:
PARTUUID="whatever" /boot ext2 noauto,noatime 1 2
right?
Is it better to use UUID or PARTUUID? (I think all of my disks use gpt)
|
Better avoid using quotation marks in fstab.
If you use an initrd then both partuuid and uuid are ok for "/" partition.
If not then please use partuuid.
Remember to update also
/etc/default/grub
with your uuid/partuuid and rebuild initrd.
Yes you can use "blkid" to get the uuid/partuuid of your partitions.
You do NOT need to use uuid/partuuid for logical volumes though.
So for you all this talk as i see now is not necessary since your / is an lv.
Just use it for the other partitions.
If you feel lazy to identify uuid/partuuid for fstab you can boot into an Arch installer mount the partitions on /mnt and run
Code: |
genfstab -U /mnt >> /mnt/etc/fstab #### uuid format
or
genfstab -t PARTUUID /mnt >> /mnt/etc/fstab #### partuuid format
|
_________________
|
|
Back to top |
|
|
Vieri l33t
Joined: 18 Dec 2005 Posts: 874
|
Posted: Fri Oct 01, 2021 2:37 pm Post subject: |
|
|
Thank you very much! |
|
Back to top |
|
|
|