LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Booting RAID0 with LILO (http://www.linuxquestions.org/questions/slackware-14/booting-raid0-with-lilo-4175433424/)

damgar 10-21-2012 09:59 PM

Booting RAID0 with LILO
 
I have been up against this all day. As much "because it's there" as any real use, I have installed Slackware-current as of yesterday to an mdadm RAID0 setup. I have (on a seperate disk altogether) created a /boot partition during installation and everything is there.

I have found plenty of tutorials for this, mostly older (Slack 12.x) that give the same answer.. Use a seperate /boot, add append = "root=/dev/md0" to lilo.conf and away you go. This might work, but LILO will not let me do it. When I run LILO it tells me that only RAID1 is allowed and refuses to install. I'm assuming something has changed, but I'm not sure what it is.

TobiSGD 10-21-2012 10:21 PM

Please post your /etc/lilo.conf and the output of
Code:

parted -l
run as root.
Please use code-tags for this.

Richard Cranium 10-21-2012 10:42 PM

Any reason why you don't want to use an initrd?

wildwizard 10-21-2012 10:56 PM

I've been testing things out to work out the right way to do this and I have the following notes so far :-


Quote:

* notes
use partition type da
if /boot is raid use metadata 0.9 and raid 1 only
swap is not detected on partitioned raid (installer bug only)


* create parititions and arrays
mdadm --create /dev/md/root
result /dev/md/root is symlink to /dev/md127
installer will only see /dev/md127 not /dev/md/root

* install ....
- lilo simple

* goto new system
chroot /mnt

* setup lilo to boot raid
mkinitrd -r /dev/md*** -f ext4 -R -m ext4
change kernel symlinks to point to generic kernel
configure lilo
- add compact
- add lba32
- add initrd = /boot/initrd.gz
- check root =
reinstall lilo

* if fixing system from install cd after the fact
assemble arrays manually
mount filesystems in order under /mnt
chroot /mnt
/dev will not be populated properly
- mount /proc
- get minor/major number from /proc/partitions for md***
- mknod /dev/md*** b major minor

damgar 10-21-2012 10:58 PM

lilo.conf
Code:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
lba32 # Allow booting past 1024th cylinder with a recent BIOS
boot = /dev/sdb
compact # faster, but won't work on all systems.
# 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
# Append any additional kernel parameters:
#append="root=/dev/md0,vt.default_utf8=1"
prompt
timeout = 300
# Normal VGA console
vga = normal
# Ask for video mode at boot (time out to normal in 30s)
#vga = ask
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# ramdisk = 0 # paranoia setting
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/md0
label = Linux
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends

parted -l
Code:

Model: ATA WDC WD10EARX-00N (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start  End    Size  File system  Name        Flags
 1      1049kB  537GB  537GB              Linux RAID  raid


Model: ATA WDC WD3200AAKX-0 (scsi)
Disk /dev/sdb: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End    Size    File system  Name              Flags
 1      1049kB  21.5GB  21.5GB  ext4        Linux filesystem


Model: ATA WDC WD10EARX-00N (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start  End    Size  File system  Name        Flags
 1      1049kB  537GB  537GB              Linux RAID  raid


Model:  Patriot Memory (scsi)
Disk /dev/sdd: 31.6GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End    Size    File system  Name              Flags
 1      1049kB  53.5MB  52.4MB  fat16        EFI System        boot
 2      53.5MB  21.5GB  21.5GB  ext2        Linux filesystem


Model: HP v100w (scsi)
Disk /dev/sde: 4041MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End    Size    Type    File system  Flags
 1      1049kB  4041MB  4040MB  primary  fat32


Model: Linux Software RAID Array (md)
Disk /dev/md0: 1074GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop

Number  Start  End    Size    File system  Flags
 1      0.00B  1074GB  1074GB  ext4

I should note that I've tried several ways to get the root=/dev/md0 in there. Both with just the append and no root= and vice versa.

damgar 10-21-2012 11:07 PM

Quote:

Originally Posted by Richard Cranium (Post 4811809)
Any reason why you don't want to use an initrd?

I'm totally fine with an initrd. I don't know what modules it would need to load. I've run the generator script. At one point I was able to boot and fail as though an initrd would save the day, but at this point I can't even get lilo to run. I'm not sure exactly what is going on here other than I've tried so many things it's all running together!

wildwizard 10-21-2012 11:08 PM

1. You must use an initrd generated with -R
2. Your lilo.conf is installing to sdb (is that right, normally you go onto sda)
3. No need for that append root=rubbish just make sure the appropriate linux section has the right root=
4. Is your separate /boot actually mounted while your doing this? (As this is probably where lilo is crapping out)

damgar 10-21-2012 11:09 PM

Quote:

Originally Posted by wildwizard (Post 4811816)
I've been testing things out to work out the right way to do this and I have the following notes so far :-

What is with partition type da instead of fd?

damgar 10-21-2012 11:23 PM

Quote:

Originally Posted by wildwizard (Post 4811826)
1. You must use an initrd generated with -R
2. Your lilo.conf is installing to sdb (is that right, normally you go onto sda)
3. No need for that append root=rubbish just make sure the appropriate linux section has the right root=
4. Is your separate /boot actually mounted while your doing this? (As this is probably where lilo is crapping out)

Lost the append, mounted /boot, created the initrd, ran lilo. It works! Thank you!

damgar 11-03-2012 08:19 PM

I decided to play with Gentoo. Gentoo is on one contiguous partition. I edited lilo.conf to add the pertinent info for Gentoo, didn't edit anything that had been working, and now I'm back to getting the RAID1 warning?

wildwizard 11-03-2012 09:42 PM

Are you running lilo from a RAID0 partition still or are you running it from the new Gentoo install?

damgar 11-04-2012 08:36 AM

I was running it from within Slackware. I saved room on the non RAID disk that houses /boot. I got it working eventually. I installed gentoo by chroot from my installed Slackware on the RAID0. I had screwed up and copied over an initrd that I created under the raided Slack to the gentoo partition on accident. Something in that seems to have caused lilo to not like the gentoo install. It was strange because running lilo would add the raided slackware and then balk at the non raided gentoo complaining about raid. I got it straightened out when I decided I'm no guru and just copied over a .config for one of Pat's huge kernels and went from there.


All times are GMT -5. The time now is 12:03 AM.