-   Slackware (
-   -   Issues during booting: slackware on external usb hd with btrfs (

saivnoba 05-17-2012 06:08 AM

Issues during booting: slackware on external usb hd with btrfs
Hi All,

I have installed slackware on my external usb harddisk with btrfs as root filesystem. I referred mainly to the following articles:

The installation is completed successfully and am writing this post from my slackware install. However I have two problems during boot.

1. root not mounting automatically

I get the following error:

mount: mounting /dev/sdb3 on /mnt failed: No such file or directory.
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
You can try to fix it. Type 'exit' when things are done.

I accidentally found out that booting proceeds if I manually mount the root on /mnt as:

mount -t btrfs -o subvol=system /dev/sdb3 /mnt
2. complain about root mounted as read-write

During boot I get another error message as:

Testing root filesystem status: read-write filesystem
***ERROR: Root partition has already been mounted read-write. Cannot check!
..Please modify your kernel with 'rdev' so that it does this. If you are booting with LILO add a line 'read-only' to the linux section...

Then there is option to just hit ENTER, and if I do, the booting continues and am able to login to the system.

I suspect these two issues are related to my lilo.conf. Can you help me with this? Mistake with spelling, space, order..?

On this external usb hd, I have GPT partitions as:
/dev/sdb1 BIOS boot
/dev/sdb2 /boot
/dev/sdb3 btrfs with 'system' and 'home' as subvolumes

I use generic kernel and created initrd.gz as suggested by the script which is:

mkinitrd -c -k -f btrfs -r /dev/sdb3 -m usb-storage:ehci-hcd:usbhid:btrfs -u -o /boot/initrd.gz
The following is my lilo.conf file.

# LILO configuration file
boot = /dev/sdb
  bitmap = /boot/slack.bmp
  bmp-colors = 255,0,255,0,255,0
  bmp-table = 60,6,1,16
  bmp-timer = 65,27,0,255
append=" rootdelay=20 vt.default_utf8=0"
timeout = 50
vga = 773

# Linux bootable partition config begins

image = /boot/vmlinuz-generic-
  append = "root=UUID=77e2cc1c-c66d-445e-8173-84335fd02ae3 rootflags=subvol=system"
  initrd = /boot/initrd.gz
  label = Slackware
  read-only  # Partitions should be mounted read-only for checking

# Linux bootable partition config ends

Thanks in advance.

XGizzmo 05-17-2012 08:00 PM

You need to pass the wait (-w10) option to the mkinitrd command, and don't forget to rerun lilo. This will give the usb subsystem time to initialize.

saivnoba 05-17-2012 10:20 PM

Thanks XGizzmo. I will try your suggestion as soon as I get to work on my laptop. But isn't "rootdelay=20" in 'append' part of lilo.conf doing the same? Also is that 10 millisecond? I have 'wait-for-root' set to 1 under initrd-tree. Is that millisecond or second?

XGizzmo 05-17-2012 10:47 PM

rootdelay does not work with an initrd, to the kernel the initrd is mounted on /. The time is in seconds.

saivnoba 05-19-2012 10:19 AM


I tried your suggestion. The problem persists. I actually put wait value 20 so that I can make out that delay. The system waits but then again drops me to shell. As before, it does not mount the root to /mnt and I have to manually do the mount.

I have installed Ubuntu 12.04 on this drive with btrfs and the following is the snippet from grub.cfg

linux  /@/boot/vmlinuz-3.2.0-24-generic root=/dev/sdb5 ro rootflags=subvol=@  quiet splash $vt_handoff
initrd  /@/boot/initrd.img-3.2.0-24-generic

Looking at it, I tried to change my 'image' line to the following (my main subvolume is named 'system').

image = /system/boot/vmlinuz-generic-
I get 'No such file or directory' error when I run /sbin/lilo. Any ideas?

saivnoba 05-19-2012 01:04 PM

I found this thread here in this forum. The problem is same as my first problem. The solution provided makes sense although is a little hack. But changing

mount -o ro -t $ROOTFS $ROOTDEV /mnt

mount -o ro,subvol=system -t $ROOTFS $ROOTDEV /mnt
in '/boot/initrd-tree/init' did not help in my case. I too ran the command first with -c option and then after editing 'init' as above, without -c option. Ran /sbin/lilo too. Just does not work. :-(

XGizzmo 05-19-2012 01:06 PM

You may need to hack the init script a bit to pass the -o subvol=system option to mount.
look for a line like:


mount -o ro -t $ROOTFS $ROOTDEV /mnt
and make it look like


mount -o ro,subvol=system -t $ROOTFS $ROOTDEV /mnt
And don't pass mkinitrd the -c option, it will wipe out your changes, Still pass the -w20 option though.

**EDIT: I see you found that same info while I was posting.

All times are GMT -5. The time now is 03:56 PM.