LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Lilo and Multi-boot x86 / x86_64 (https://www.linuxquestions.org/questions/slackware-installation-40/lilo-and-multi-boot-x86-x86_64-a-786228/)

pwatk 02-01-2010 10:44 AM

Lilo and Multi-boot x86 / x86_64
 
Hi,

I decided that it was about time I tried out 64bit Slack today.

I've installed it beside my 32bit installation in logical partitions:

Code:

pwatk@laptop:~$ cat /proc/partitions
major minor  #blocks  name

  8        0  312571224 sda
  8        1    995998 sda1    <--- swap
  8        2  20000925 sda2    <--- 32bit /
  8        3  134761252 sda3    <--- 32bit /home
  8        4          1 sda4   
  8        5  20972826 sda5    <--- 64bit /
  8        6  135837576 sda6    <--- 64bit /home

Everything has installed fine and boots using the huge kernel but I'm having a few issues with lilo and booting the generic kernel.

My first hurdle is amending my lilo.conf so I can boot both installations which is proving to be a task (I've never found lilo that intuitive anyway).

Here's my current config can someone tell me where I'm going wrong here because I keep getting a fatal error because lilo can't find the kernels from my other installation:

Code:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# 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 = 300
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
# VESA framebuffer console @ 1024x768x256
# vga = 773
# Normal VGA console
# vga = normal
# 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
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz-generic-2.6.29.6
  initrd = /boot/initrd.gz
  root = /dev/sda5
  label = Generic64
  read-only
  addappend="resume=/dev/sda1"
image = /boot/vmlinuz
  root = /dev/sda5
  label = Linux64
  read-only
image = /boot/vmlinuz-generic-smp-2.6.29.6-smp
  initrd = /boot/initrd.gz
  root = /dev/sda2
  label = Generic
  read-only
  addappend="resume=/dev/sda1"
image = /boot/vmlinuz
  root = /dev/sda2
  label = Linux
  read-only
# Linux bootable partition config ends

My next issue is creating a initrd for the generic kernel, I keep getting a kernel panic regarding the root partition being unmountable.

I used a script I made ages ago to create the initrd (I've never had issues with it before). Again can someone help me track down the problem here:

Code:

#!/bin/sh

KERNEL=$(uname -r)
MODULES=usbhid:ehci-hcd:ohci-hcd
ROOTDEV=$(df | grep " /$" | awk {'print $1'})
ROOTFS=$(df -T | grep " /$" | awk {'print $2'})
SWAP=$(awk 'NR==2 {print $1}' /proc/swaps)            # Use first swap partition found
KEYMAP=uk

echo "
mkinitrd -c -k ${KERNEL} -m ${ROOTFS}:${MODULES} \\
  -f ${ROOTFS} -r ${ROOTDEV} -h ${SWAP} -l ${KEYMAP}
"
mkinitrd -c -k ${KERNEL} -m ${ROOTFS}:${MODULES} -f ${ROOTFS} -r ${ROOTDEV} -h ${SWAP} -l ${KEYMAP}

Thanks

koenigdavidmj 02-01-2010 01:49 PM

About the initrd, I suggest copying /etc/mkinitrd.conf.sample to /etc/mkinitrd.conf, changing the lines as required, and then running `mkinitrd -c -F`.

About LILO, you need to have both kernels on mounted filesystems and reference those paths in your lilo.conf. For example, if you're running in the 64-bit installation, you need to have the 32-bit partition mounted (my example location will be /mnt/slack32). Then you have to point LILO to a kernel at path /mnt/slack32/boot/vmlinuz .

pwatk 02-01-2010 02:22 PM

Thanks for your reply,

I managed to figure out lilo. Helps to rtfm sometimes :), I thought the image had to be relative to the root (obviously not).

I finally got around to using the mkinitrd_command_generator.sh script (it's only taken a year or two before I considered taking the easy route :) ) and that seams to have solved the issue with the generic kernel.

I have bigger issues at the moment though. I ran slackpkg upgrade-all and it's managed to screw up something. I can't even login because apparently /bin/bash can't be found.

Strange happenings but maybe not for this topic. I'm gonna reinstall and try again, it's less work than fixing the problem right now (even though bash exists).

koenigdavidmj 02-02-2010 08:31 AM

On the weird Bash issue, check that you uncommented a mirror of the right architecture (64 vs 32 bit) in /etc/slackpkg/mirrors. It's a common mistake.

Good luck!

pwatk 02-03-2010 12:40 AM

Got it one! I nearly done it on the second attempt as well :newbie: .

Nevermind, it's all sorted now. Thanks for your input.


All times are GMT -5. The time now is 01:53 AM.