You are not logged in.

#1 2018-02-02 19:48:33

daankata
Member
Registered: 2017-05-21
Posts: 47

[SOLVED] Can't mount USB partition to /boot directory

I have an ext2 primary USB boot partition, which I use everyday for booting. But I decided to make a second boot partition on an another USB stick for backup.

So first I partitioned the new disk with dos and created a bootable partition. Then I created the filesystem (ext2, like the old one) and installed GRUB on the new USB stick as stated in the wiki https://wiki.archlinux.org/index.php/GR … and_tricks. But then I tried mounting the new /dev/sdb1 to the existing /boot partition so I can generate the mkinitcpio images on the new USB stick but it wouldn't let me mount it to /boot. Everytime I type

sudo mount /dev/sdb1 /boot

it doesn't do anything. Why I can't mount the new USB partition to /boot?

Note: The old USB boot partition is unplugged and the boot partition is empty. Mounting the new USB boot partition to i.e. /mnt/usb works, but to /boot it doesn't. Also everytime I insert the old USB stick it automatically mounts to /boot.

Thank you!

Last edited by daankata (2018-02-03 10:30:42)

Offline

#2 2018-02-02 20:38:48

esuhl
Member
From: UK
Registered: 2009-09-16
Posts: 140

Re: [SOLVED] Can't mount USB partition to /boot directory

I'm not sure (I'm always be a newbie with Linux), but...

I don't think you can unmount /boot on a running system.  Wouldn't you have to boot the live/installation image and use chroot...?

https://wiki.archlinux.org/index.php/Change_root

Offline

#3 2018-02-02 20:47:38

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Can't mount USB partition to /boot directory

esuhl wrote:

I don't think you can unmount /boot on a running system.  Wouldn't you have to boot the live/installation image and use chroot...?

Not true, in fact a lot of systems only have /boot mounted during booting and unmounted immediately afterwards (the standard pacman hooks will mount it during a kernel upgrade).

Even if you didn't unmount it first, mounting another partition would simply mount over the top of the existing /boot leading to the required outcome.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#4 2018-02-02 20:56:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: [SOLVED] Can't mount USB partition to /boot directory

daankata wrote:

sudo mount /dev/sdb1 /boot

it doesn't do anything.

On success, mount shouldn't give any output.  I doubt that's what you mean by not doing anything, but note that this is all you've given us.  Please show diagnostics of the actual problem.  What is the output of `mount` and perhaps `lsblk` could be useful.  Are there any journal log errors? or anything odd in dmesg when you plug in the new usb drive?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2018-02-02 21:01:11

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] Can't mount USB partition to /boot directory

The output of dmesg might provide clues.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#6 2018-02-02 21:38:20

daankata
Member
Registered: 2017-05-21
Posts: 47

Re: [SOLVED] Can't mount USB partition to /boot directory

When I boot in the system with the main USB stick, this is the output of lsblk:
Note: I am not using /dev/sda1

NAME              MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                 8:0    0 232.9G  0 disk
sda1                8:1    0   500M  0 part
sda2                8:2    0 232.4G  0 part  /
sdb                 8:16   1   7.5G  0 disk
sdb1                8:17   1   500M  0 part  /boot

When I unplug the USB stick, and insert the new one, this is the output of lsblk:

NAME              MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                 8:0    0 232.9G  0 disk
sda1                8:1    0   500M  0 part
sda2                8:2    0 232.4G  0 part  /
sdb                 8:16   1   7.5G  0 disk
sdb1                8:17   1   500M  0 part

/dev/sdb1 is partioned exactly as the "main" USB stick. Output of the "new" USB stick with fdisk:

Disk /dev/sdb: 7.5 GiB, 8053063680 bytes, 15728640 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: 0x9f872f26

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *     2048 1026047 1024000  500M 83 Linux

I created an Ext2 filesystem on the "new" USB stick exactly as the old one. Then when I mount the "new" /dev/sdb1 to /boot there isn't any output, but /boot is empty and unmounting /boot with `umount` says that /boot isn't mounted. Could fstab be the problem and not allow me to mount the new partiton because there is an entry in fstab? This is my fstab entry for the "main" boot partition:

# Boot partition
UUID=d78d9aac-b7ed-42a1-aff4-sb74k7e4c01c	/boot     	ext2      	rw,nodev,nosuid,noexec,noatime,block_validity,barrier,user_xattr,acl	0 2

The verbose output of `mount` is:

mount: /dev/sdb1 mounted on /boot.

But as I said /boot is still empty and `lsblk` is showing that /dev/sdb1 is not mounted.
And this is the dmesg output from when I disconnect the "main" USB stick, then plug the "new" USB and mount /dev/sdb1 to /boot

[  103.693126] usb 1-1.2: USB disconnect, device number 3
[  111.230001] usb 1-1.2: new high-speed USB device number 4 using ehci-pci
[  111.383930] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[  111.384216] scsi host6: usb-storage 1-1.2:1.0
[  112.587653] scsi 6:0:0:0: Direct-Access     General  USB Flash Disk   1100 PQ: 0 ANSI: 4
[  112.589409] sd 6:0:0:0: [sdb] 15728640 512-byte logical blocks: (8.05 GB/7.50 GiB)
[  112.590445] sd 6:0:0:0: [sdb] Write Protect is off
[  112.590451] sd 6:0:0:0: [sdb] Mode Sense: 43 00 00 00
[  112.591346] sd 6:0:0:0: [sdb] No Caching mode page found
[  112.591357] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[  112.598379]  sdb: sdb1
[  112.602723] sd 6:0:0:0: [sdb] Attached SCSI removable disk
[  133.527874] EXT4-fs (sdb1): mounting ext2 file system using the ext4 subsystem
[  133.538115] EXT4-fs (sdb1): mounted filesystem without journal. Opts: (null)

Last edited by daankata (2018-02-02 21:39:56)

Offline

#7 2018-02-02 21:49:25

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Can't mount USB partition to /boot directory

With both drives plugged in, what's the output of blkid?

Do the USB partitions have the same UUID?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#8 2018-02-02 21:55:41

daankata
Member
Registered: 2017-05-21
Posts: 47

Re: [SOLVED] Can't mount USB partition to /boot directory

slithery wrote:

With both drives plugged in, what's the output of blkid?

Do the USB partitions have the same UUID?

The USB drives are exactly the same, but the UUID's aren't.

NAME                    FSTYPE      LABEL UUID                                   MOUNTPOINT
sda                                                                              
├─sda1                                                                           
└─sda2                  ext4              5cdf20a3-ebb6-4eed-9309-4bb98af2f6bb   /
sdb                                                                              
└─sdb1                  ext2              0bac3f18-7230-47d9-9a1b-447b0f28a55c   
sdc                                                                              
└─sdc1                  ext2              d78d9aac-b7ed-42a1-aff4-sb74k7e4c01c   /boot

Thank you!

Offline

#9 2018-02-02 23:23:10

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Can't mount USB partition to /boot directory

Looks to me like everything is mounted just fine. Are you sure you've put anything on it?

Offline

#10 2018-02-03 10:30:28

daankata
Member
Registered: 2017-05-21
Posts: 47

Re: [SOLVED] Can't mount USB partition to /boot directory

After multiple attempts to reinstall GRUB and mount the "new" USB stick, I finally managed to figure out my mistake. So I needed to first unmount the boot directory with the main USB stick plugged in. Then I plug the "new" one and mount the partition successfully to /boot.

Offline

Board footer

Powered by FluxBB