LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-17-2012, 05:08 AM   #1
saivnoba
Member
 
Registered: Aug 2010
Distribution: Debian Sid, openSUSE, Gentoo, Slackware64
Posts: 68

Rep: Reputation: 2
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:
1. http://www.yodaconditions.com/?p=14
2. http://snarfu.com/slackware/slackware-btrfs-encryption/

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:
Code:
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:
Code:
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:
Code:
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 mkinitrd_command_generator.sh script which is:
Code:
mkinitrd -c -k 2.6.37.6 -f btrfs -r /dev/sdb3 -m usb-storage:ehci-hcd:usbhid:btrfs -u -o /boot/initrd.gz
The following is my lilo.conf file.
Code:
# LILO configuration file
boot = /dev/sdb
lba32
  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"
prompt
timeout = 50
vga = 773

# Linux bootable partition config begins

image = /boot/vmlinuz-generic-2.6.37.6
  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.

Last edited by saivnoba; 05-17-2012 at 05:14 AM.
 
Old 05-17-2012, 07:00 PM   #2
XGizzmo
Member
 
Registered: Mar 2007
Distribution: Slackware
Posts: 264

Rep: Reputation: 68
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.
 
Old 05-17-2012, 09:20 PM   #3
saivnoba
Member
 
Registered: Aug 2010
Distribution: Debian Sid, openSUSE, Gentoo, Slackware64
Posts: 68

Original Poster
Rep: Reputation: 2
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?
 
Old 05-17-2012, 09:47 PM   #4
XGizzmo
Member
 
Registered: Mar 2007
Distribution: Slackware
Posts: 264

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

Last edited by XGizzmo; 05-17-2012 at 09:49 PM.
 
Old 05-19-2012, 09:19 AM   #5
saivnoba
Member
 
Registered: Aug 2010
Distribution: Debian Sid, openSUSE, Gentoo, Slackware64
Posts: 68

Original Poster
Rep: Reputation: 2
Hi,

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
Code:
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').
Code:
image = /system/boot/vmlinuz-generic-2.6.37.6
I get 'No such file or directory' error when I run /sbin/lilo. Any ideas?

Last edited by saivnoba; 05-19-2012 at 09:21 AM.
 
Old 05-19-2012, 12:04 PM   #6
saivnoba
Member
 
Registered: Aug 2010
Distribution: Debian Sid, openSUSE, Gentoo, Slackware64
Posts: 68

Original Poster
Rep: Reputation: 2
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
Code:
mount -o ro -t $ROOTFS $ROOTDEV /mnt
to
Code:
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. :-(
 
Old 05-19-2012, 12:06 PM   #7
XGizzmo
Member
 
Registered: Mar 2007
Distribution: Slackware
Posts: 264

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

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

Code:
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.

Last edited by XGizzmo; 05-19-2012 at 12:10 PM. Reason: update
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Booting Slackware from an external USB wisdev Linux - Hardware 2 09-01-2009 08:53 AM
External USB Hard Drive and re-booting coreychch Linux - Hardware 1 04-26-2009 04:36 AM
booting 11.0 off external usb drive jmille34 Slackware 2 11-18-2006 01:43 PM
Booting Slackware to USB External HDD linux_weenie Slackware 1 05-15-2005 09:47 PM
booting Linux from external USB 2.0 device friedrice4u Linux - Newbie 2 09-19-2004 07:44 AM


All times are GMT -5. The time now is 07:08 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration