LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   LILO confusion when both 64-Bit and 32-Bit Slackware are installed (http://www.linuxquestions.org/questions/slackware-14/lilo-confusion-when-both-64-bit-and-32-bit-slackware-are-installed-4175426286/)

luvr 09-08-2012 04:16 PM

LILO confusion when both 64-Bit and 32-Bit Slackware are installed
 
I’m using an AMD64 computer, and I decided to try and install the 32-Bit and the 64-Bit versions of Slackware 13.37 next to each other (each on their own partition, of course). I installed 64-Bit first, then 32-Bit, and set up LILO on the MBR.

Result: 32-Bit runs fine, but 64-Bit will not boot. Instead, it hangs on the following on-screen messages:
Code:

Freeing unused kernel memory: 612k freed
Write protecting the kernel text: 10108k
Write protecting the kernel read-only data: 2540k
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c

Then, some time later, it displays:
Code:

INFO: taskswapper:1 blocked for more than 120 seconds
followed by a call trace, and a number of similar messages about blocked tasks, each time followed by a call trace.

I also found a work-around: If I set up LILO on the Root Blocks of my system partitions, and make the MBR chainload to them, then both installs work fine. Here is the list of boot options in my MBR LILO configuration:
Code:

image = /boot/vmlinuz
  root = /dev/sda2
  label = Slackware-32
  read-only
image = /boot/vmlinuz
  root = /dev/sda3
  label = Slackware-64
  read-only
other = /dev/sda2
  label = Chainload-32
other = /dev/sda3
  label = Chainload-64

The “Slackware-64” entry is the one that fails to boot, while the other three work fine.

After a little experimenting, I discovered that the “Slackware-64” entry appears to load the 32-Bit kernel (from the /dev/sda2 partition) instead of the 64-Bit one (which sits on /dev/sda3). It looks like it locates the “/boot/vmlinuz” file while the “/sbin/lilo” is being run to install the boot loader (i.e., when my root filesystem is /dev/sda2).

I could actually confirm my suspicion after I reinstalled the MBR LILO from the 64-Bit system instead; after that, the 32-Bit system could successfully boot, but it turned out to run the 64-Bit kernel, while its root filesystem was the 32-Bit Slackware system partition.

I’m not sure if this behaviour should be considered a bug; it may simply work “as designed,” given that the location of the kernel is determined when the “/sbin/lilo” command is run. I do know, however, that it is something to be aware of!

kikinovak 09-08-2012 04:23 PM

I have a double-boot with Slackware-13.37 and Slackware64-13.37 here, using LiLO. It's installed on the MBR, with sda1 as common swap for both systems, sda2 and sda5 the respective /boot partitions and sda3 and sda6 the respective root partitions of both systems.

Here's my /etc/lilo.conf:

Code:

# Start LILO global section
# Append any additional kernel parameters:
append="nomodeset quiet ipv6.disable=1 vt.default_utf8=1"
boot = /dev/sda
compact
lba32
...
prompt
timeout = 100
change-rules
  reset
vga = 788
image = /boot/vmlinuz-generic-smp-2.6.37.6-smp
  initrd = /boot/initrd.gz
  root = /dev/sda3
  label = 13.37-32bit
  read-only
image = /mnt/sda5/vmlinuz-generic-2.6.37.6
  initrd = /mnt/sda5/initrd.gz
  root = /dev/sda6
  label = 13.37-64bit
  read-only

Don't forget to mount the partition of your other system(s) before issuing 'lilo'.

Cheers.

T3slider 09-08-2012 05:09 PM

GRUB uses the run-time location of the kernel and so you would specify /boot/vmlinuz for each installation. LILO, however, directly accesses inode locations and therefore you must specify the current location of the kernel on the running system. The other boot partition (or root (/) partition if /boot is not on its own partition) needs to be mounted when lilo is run but does not need to be mounted during everyday use.

luvr 09-09-2012 04:55 AM

Quote:

Originally Posted by kikinovak (Post 4775806)
Code:

.
.
.
image = /mnt/sda5/vmlinuz-generic-2.6.37.6
.
.
.

Don't forget to mount the partition of your other system(s) before issuing 'lilo'.

Thanks a lot for this! These two bits of info are exactly what I was missing!

kikinovak 09-09-2012 09:43 AM

Quote:

Originally Posted by luvr (Post 4776050)
Thanks a lot for this! These two bits of info are exactly what I was missing!

Glad I could be of help. Mark this thread as "Solved" eventually.

yenn 09-10-2012 11:27 AM

I usually have shared /boot for multiple distributions and use symlinks, like vmlinuz-slackware, vmlinuz-gentoo, vmlinuz-salix, etc. Only drawback is that I have to make sure symlinks points to right kernel after any kernel upgrade.

Kikinovak's solution seems better for these situations. Thanks for sharing!


All times are GMT -5. The time now is 11:42 PM.