LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 03-20-2011, 09:16 AM   #1
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Rep: Reputation: 20
Slackware 13.37rc2 btrfs with generic kernel


I was interested in the idea of the btrfs subvolumes, so I made a virtual machine and installed Slackware as per the instructions here:

http://www.yodaconditions.com/?p=14

It all went very well, but when I tried to switch from the huge kernel to the generic kernel and use the initrd.gz generated from step 29 (except that I used 2.6.37.4-smp instead of whatever's there) in lilo.conf, it failed to boot. I also noticed that in the instructions themselves, the poster doesn't actually add the initrd.gz to lilo.conf, so I'm guess the huge kernel has everything it needs to boot properly. So all in all, I'm a little confused.

Any help would be appreciated.
 
Old 03-20-2011, 02:10 PM   #2
kingbeowulf
Senior Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware
Posts: 1,266
Blog Entries: 11

Rep: Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744
Yes, there is a step missing:
Code:
# mkinitrd -c -k 2.6.35.11 -m btrfs:ext4 -f btrfs -r /dev/sdb6
# Run /sbin/lilo
EDIT: Actually I just carefully read that post. Yes, the author DOES say to add initrd.gz (Step 26) to lilo.conf. Note also the append in step 25.

After mkinitrd, you need to update lilo.conf and THEN run lilo. Edit lilo.conf to point to the correct generic kernel and to your initrd.gz. For example, in my slackware-current (32 bit version) VM:

Code:
# mkinitrd -c -k 2.6.37.4-smp -m ext4 -f ext4 -r /dev/sda1
and /etc/lilo.conf is

Code:
boot = /dev/sda
lba32
compact        # faster, but won't work on all systems.
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=" vt.default_utf8=0"
prompt
timeout = 50
image = /boot/vmlinuz-generic-smp-2.6.37.4-smp
  initrd = /boot/initrd.gz
  root = /dev/sda1
  label = Slackware
  read-only  # Partitions should be mounted read-only for checking
Enjoy.

Last edited by kingbeowulf; 03-20-2011 at 02:12 PM. Reason: correction
 
Old 03-20-2011, 02:29 PM   #3
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
I've gone through the instructions you linked to as I'm also interested in btrfs so I created my own VM. I've played around with btrfs before but I'm certainly not an expert. This time I tried just using Slackware's setup program to format a btrfs root partition and when it had finished created a /home subvolume. I noticed Yoda, (I'll call him that), missed out the initial ram disk bits of lilo.conf so I added them myself. This booted the generic fine but failed on the huge kernel.

Then I realized that Yoda's instructions you linked to had two subvolumes - one for / (system) and one for home (home). I reran the install following the instructions and this time my generic kernel falls with "ERROR: No /sbin/init found on rootdev (or not mounted) Trouble ahead." The huge kernel boots OK though. Oddly out of my two slightly different attempts this time, one with one subvolume and one with two, either the generic or the huge kernel works but not both! I'm still playing around with this as btrfs setups are a new thing to me. I'll let you you if I find anything relevant - I've got an idea it's something simple I'm missing.

Last edited by bgeddy; 03-20-2011 at 02:31 PM.
 
Old 03-20-2011, 05:30 PM   #4
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by bgeddy View Post
Then I realized that Yoda's instructions you linked to had two subvolumes - one for / (system) and one for home (home). I reran the install following the instructions and this time my generic kernel falls with "ERROR: No /sbin/init found on rootdev (or not mounted) Trouble ahead." The huge kernel boots OK though.
That's the same thing that's currently happening to me too. Other than that hiccup, it seems to be functioning normally. I never added the initrd.gz to the initial lilo configuration (booting of the huge kernel) but when I did it messed up with that error message above. For some reason mkinitrd doesn't like it I guess.

Last edited by spudgunner; 03-20-2011 at 05:33 PM.
 
Old 03-20-2011, 10:32 PM   #5
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
Just a note from my experience, VirtualBox OSE appears to require the boot loader be installed to the MBR of the virtual hard disk.
i.e.
Code:
#lilo.conf
...
boot=/dev/sda
...
image=/boot/vmlinuz-generic-smp-2.6.37.4-smp
initrd=/boot/initrd.gz
root=/dev/sda1
label=Slackware
read-only
...
rerun lilo


This may not be true for the full VirtualBox install that lets you use virtual sata drives instead of ide drives.

Also, I've had no such troubles with btrfs in VirtualBox with multiple volumes... But... I have a /boot partition that's ext3. So perhaps lilo doesn't support btrfs yet? Err... I thought lilo used hard linking to the partition and inodes to get the boot files.

Last edited by lumak; 03-20-2011 at 10:38 PM.
 
Old 03-21-2011, 07:58 AM   #6
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Original Poster
Rep: Reputation: 20
I always install to the MBR, but I re-ran it anyways. I got a warning from lilo this time that I don't remember before (but just because I don't remember it, doesn't mean it isn't there). It's about the initrd is not small enough to fit in the 15M-16M memory hole so it will be loaded elsewhere and assumed the the BIOS can read memory above 16M or something (don't have it with me at the time).
 
Old 03-21-2011, 08:16 AM   #7
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
When you re mount your partitions after booting from the install iso/cd, don't forget to do
mount /dev/sda1 /mnt
mount /dev/sda? /mnt/whatever
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt

It helps to avoid some errors when running lilo. Also the liloconfig probably has the option "lba32" around the "boot=/dev/sda". If it isn't there, you can try adding it. I can't remember the situations of when I got the 15M-16M error or what I did to fix it... but those options might help.

Also, be sure that
image=/boot/vmlinuz-generic-smp-2.6.37.4-smp
initrd=/boot/initrd.gz

are pointing to the correct files. I'm sure that was already done, I'm just trying to cover everything that I would check.
 
Old 03-21-2011, 09:52 AM   #8
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Original Poster
Rep: Reputation: 20
I can boot the system normally using the huge kernel, so I am not needing to go through all the mounting stuff. I'll have to check my lilo.conf to make sure all that stuff is right when I get home, but I'm pretty sure it is.
 
Old 04-08-2011, 05:47 PM   #9
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Original Poster
Rep: Reputation: 20
Sorry for the delay in getting back, I got caught up with school. When installing Slackware, I didn't do the binding as mentioned above, but those lines in the lilo.conf are correct
 
Old 04-13-2011, 06:32 PM   #10
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Original Poster
Rep: Reputation: 20
So I've installed rc3.1415... on my netbook, hoping to figure out this btrfs problem, but I'm still stuck on it. Not getting the weird error about the initrd being to big anymore (I think that was something to do with the VM I was using it in), but I still can't get the initrd to work with the generic kernel (huge kernel boots fine without it).

My System is laid out as follows:
sda1: ext4, contains /boot
sda2: btrfs, divided as follows
"system" subvolume, contains /
"home" subvolume, contains /home
sda3: ext4, contains slackware-current mirror
sda4: swap

Here's my lilo.conf:
Code:
# Append any additional kernel parameters:
append=" vt.default_utf8=0"
boot = /dev/sda

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
  bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
  bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used.  We don't specify it here, as there's just one column.
  bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
  bmp-timer = 65,27,0,255

# Standard menu.
# Or, you can comment out the bitmap menu above and 
# use a boot message with the standard menu:
#message = /boot/boot_message.txt

# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
# VESA framebuffer console @ 800x600x32k
vga = 787
# End LILO global section
# Linux bootable partition config begins - This entry works
image = /boot/vmlinuz
  append = "rootflags=subvol=system"
  root = /dev/sda2
  label = Slackware-huge
  read-only
# Linux bootable partition config ends

#Generic - This entry does not work
image = /boot/vmlinuz-generic-smp-2.6.37.6-smp
  append = "rootflags=subvol=system"
  initrd = /boot/initrd.gz
  root = /dev/sda2
  label = Slackware-gen
  read-only
#End of config
The mkinitrd command I used:
Code:
mkinitrd -c -k 2.6.37.6-generic-smp -m btrfs:ext4 -f btrfs -r /dev/sda2
/etc/fstab:
Code:
/dev/sda4        swap             swap        defaults         0   0
#/dev/sda2        /                btrfs       defaults         1   1
/dev/sda2   /   btrfs   defaults,subvol=system   0   1
/dev/sda2   /home   btrfs   defaults,subvol=home   0   1
/dev/sda1   /boot   ext4   defaults   0   1
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
Command recommend by mkinitrd_command_generator.sh
Code:
mkinitrd -c -k 2.6.37.6-smp -f btrfs -r /dev/sda2 -m usbhid:ehci-hcd:uhci-hcd:btrfs -u -o /boot/initrd.gz
I have never needed usbhid, ehci-hcd, or uhci-hcd modules in the past with my computer, nor have I ever used the -u option with mkinitrd, and this computer has always worked fine. In addition to this, it is missing the ext4 module, so I opted not to try this.

Any more hints would be appreciated.
 
Old 04-13-2011, 07:13 PM   #11
alekow
Member
 
Registered: Sep 2009
Distribution: Slackware
Posts: 230

Rep: Reputation: 75
Quote:
mkinitrd -c -k 2.6.37.6-generic-smp -m btrfs:ext4 -f btrfs -r /dev/sda2
should be
Code:
mkinitrd -c -k 2.6.37.6-smp -m btrfs:ext4 -f btrfs -r /dev/sda2
?

Last edited by alekow; 04-13-2011 at 07:14 PM.
 
Old 04-13-2011, 08:16 PM   #12
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Original Poster
Rep: Reputation: 20
That was my bad.... I was scrolling on the bash commands to copy/paste stuff... the generic doesn't work, I know for sure I did it without the generic in it... my mistake.
 
Old 04-14-2011, 04:29 AM   #13
alekow
Member
 
Registered: Sep 2009
Distribution: Slackware
Posts: 230

Rep: Reputation: 75
Did you read this thread?
http://www.linuxquestions.org/questi...-issue-867985/
 
1 members found this post helpful.
Old 04-14-2011, 10:26 AM   #14
spudgunner
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 229

Original Poster
Rep: Reputation: 20
Thanks for pointing that thread out to me, I have seen it... guess I was just being dumb at the time. Doing what was suggested in there worked great.

My complete solution:

Run:
Code:
mkinitrd -c -k 2.6.37.6-smp -m btrfs:ext4 -f btrfs -r /dev/sda2
Edit /boot/initrd-tree/init, add "subvol=system" as an option as such (and save):
Code:
mount -o ro -t $ROOTFS $ROOTDEV /mnt #Original Line
mount -o ro,subvol=system -t $ROOTFS $ROOTDEV /mnt #Edited Line
Run:
Code:
mkinitrd -k 2.6.37.6-smp -m btrfs:ext4 -f btrfs -r /dev/sda2
And run lilo again. And it WORKS!
 
Old 03-22-2013, 09:46 PM   #15
camerabambai
Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 408

Rep: Reputation: 54
A little help,i tried with btrfs as you tried
But i have a btrfs with 2 disk(created mkfs.btrfs /dev/sda3 /dev/sdb3)
when i use sda3 on mkinitrd and lilo.conf failed with "failed to read the system array".
So on console i use mount -t btrfs -o subvol=system /dev/sdb3 /mnt..and works.
If i change with sdb3 on mkinitrd and lilo.conf failed with "failed to read the system array".
and i must use(mount -t btrfs.../dev/sda3) and works.
This on every reboot(sic!)
If i try the -B option on mkinitrd it create /mnt/home and /mnt/system and of course
won't boot
Someone can help?

thanks

Last edited by camerabambai; 03-22-2013 at 10:12 PM.
 
  


Reply



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
Kernel panic with generic kernel Slackware 13.1 goodadamgood Slackware 3 01-31-2011 04:57 PM
DMA not working slackware 12.1 Generic Stock SMP kernel duryodhan Slackware 8 09-18-2008 12:54 PM
Slackware 12, changing to generic kernel on raid1, mkinitrd issue [GOD]Anck Slackware 15 02-14-2008 07:25 PM
Cannot boot a software raid array with 'generic' kernel (Slackware 12) dieymir Slackware 2 07-11-2007 09:26 PM
Slackware 10.2 + Kernel (generic) 2.6.13 + Tv LG LTT-200 Capture Card Problems SoulSlave Slackware 10 11-27-2005 03:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:36 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration