lilo, dual boot with 13.0 and 13.1beta

You have a problem with Salix? Post here and we'll do what we can to help.
pevsner
Posts: 81
Joined: 12. Apr 2010, 16:08

lilo, dual boot with 13.0 and 13.1beta

Post by pevsner »

Hi,
I have both salix 13.0 and 13.1beta(32bit versions) installed as a dual boot.
Lilo only allows me to boot the drive on which lilo was configured, I guess that's due to the later kernel changing hd's to sda. Is there a way to configure lilo so that I can boot both.
Also, If not, what command should I use to boot an installed system from the installation cd, I have tried "linux root=/dev/sda1 ro" and various other permutations, to no avail.
Thank you in advance.
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: lilo, dual boot with 13.0 and 13.1beta

Post by gapan »

You can certainly do it. You just have to mount the other partition before running lilo and point the respective entries in lilo.conf to it. For example, I have

Code: Select all

# Salix64
image = /boot/vmlinuz
root = /dev/sda5
label = Salix64
read-only

# Linux bootable partition config begins
image = /mnt/salix/boot/vmlinuz
root = /dev/sda1
label = Salix32
read-only
in the lilo.conf of my Salix64 installation (running from /dev/sda5).
Image
Image
User avatar
Akuna
Salix Wizard
Posts: 1038
Joined: 14. Jun 2009, 12:25

Re: lilo, dual boot with 13.0 and 13.1beta

Post by Akuna »

If you setup lilo from Salix 13.0, you may need to override the change from hdxx to sdxx by adding the following line before your salix 13.1 entry:
addapend = "root=dev/sdxx "
just before the line:
root=dev/hdxx
label=... etc.

Where sdxx is your partition as it is recognized in Salix 13.1 & hdxx is your partition as it is recognized in Salix 13.0
Image
What really matters is where you are going, not where you come from.
pevsner
Posts: 81
Joined: 12. Apr 2010, 16:08

Re: lilo, dual boot with 13.0 and 13.1beta

Post by pevsner »

I still seem to be having problems.
I have my alternative hd mounted via fstab, and amended lilo.conf

Code: Select all

# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/hda3
  label = salix3
  read-only  # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /mnt/salix1/boot/vmlinuz
addappend = "root=dev/sda1"
  root = /dev/hda1
  label = salix1
  read-only  # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
If I run lilo -v I get an error

Code: Select all

Warning: LBA32 addressing assumed
Reading boot sector from /dev/hda
Using BITMAP secondary loader
Calling map_insert_data
Mapping bitmap file /boot/salix.bmp
Calling map_insert_file

Boot image: /boot/vmlinuz -> vmlinuz-huge-smp-2.6.29.6-smp
Added salix3 *

Boot image: /mnt/salix1/boot/vmlinuz -> vmlinuz-huge-smp-2.6.33.3-smp
Added salix1

Writing boot sector.
/boot/boot.0300 exists - no boot sector backup copy made.
One warning was issued.
And trying to boot the alternative hd through lilo, I get " kernel panic".
Is it perhaps that I have my main system (sda3) on the second drive partition?
Help would be appreciated, thankyou for your previous posts.
User avatar
gapan
Salix Wizard
Posts: 6361
Joined: 6. Jun 2009, 17:40

Re: lilo, dual boot with 13.0 and 13.1beta

Post by gapan »

What's this for?

Code: Select all

addappend = "root=dev/sda1"
Image
Image
pevsner
Posts: 81
Joined: 12. Apr 2010, 16:08

Re: lilo, dual boot with 13.0 and 13.1beta

Post by pevsner »

addappend = "root=dev/sda1"
I took from Akuna's post, to deal with the different kernels.
If I use just root=/dev/sda1 I get

Code: Select all

Fatal: Illegal 'root=' specification: /dev/sda1
when running lilo -v
If I use

Code: Select all

root=/dev/hda1
it starts to boot , then fails becasuse it need to access "sda1" not "hda1".
I am quite happy with 13.0 atm , but its nice to have 13.1 to check the current updates.
Re: previous post
Also, If not, what command should I use to boot an installed system from the installation cd, I have tried "linux root=/dev/sda1 ro" and various other permutations, to no avail.
User avatar
Akuna
Salix Wizard
Posts: 1038
Joined: 14. Jun 2009, 12:25

Re: lilo, dual boot with 13.0 and 13.1beta

Post by Akuna »

gapan wrote:What's this for?

Code: Select all

addappend = "root=dev/sda1"
This will be added to the global kernel boot parameter , so that lilo knows that what was mounted as hdxx during configuration is actually sdxx at boot time. (BTW it is best practice to leave an empty space at the end => addappend = "root=dev/sda1 ")

From lilo.conf man page
addappend=<string>
(22.6) The kernel parameters from the specified string, are con‐
catenated to the parameter(s) from an append= specification (see
below). The string must be enclosed within double quotes. Usu‐
ally, the previous append= will specify parameters common to all
kernels by appearing in the top, or global, section of the con‐
figuratin file and addappend= will be used to add local parame‐
ter(s) to an individual image. Addappend= may be used only once
per "image=" section.
pevsner wrote:Is it perhaps that I have my main system (sda3) on the second drive partition?
No, that shouldn't be a problem & BTW that warning message is not really a problem either.

This is really odd... it should have worked. When you look in salix 13.1 /etc/fstab, can you confirm that the partition used for your main filesystem (/ ) is indeed /dev/sda1?

Just to be sure, can you give me your /etc/fstab files for both salix 13.0 & salix 13.1?

Tx.
Image
What really matters is where you are going, not where you come from.
pevsner
Posts: 81
Joined: 12. Apr 2010, 16:08

Re: lilo, dual boot with 13.0 and 13.1beta

Post by pevsner »

salix13.1beta(the one i cant access) fstab:

Code: Select all

/dev/sda4        swap             swap        defaults         0   0
/dev/sda1        /                ext3        noatime,defaults 1   1
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,users,rw,umask=00 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
salix 13.0 (main system,which I'm installing lilo on) fstab:

Code: Select all

 /dev/hdb3        swap             swap        defaults         0   0
/dev/hda3        /                ext3        noatime,defaults 1   1
/dev/hda8        /home            ext3        defaults         1   2
/dev/hdb2        /win2            ntfs-3g     umask=000        1   0
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,users,rw,umask=00 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

/dev/hda1 /mnt/salix1 ext3 defaults,errors=remount-ro,users,user_xattr,user 0 0
/dev/hda9 /media/hda9 ext3 defaults,errors=remount-ro,users,user_xattr,user 0 0
I tried adding a space before " as you recommended but still get "kernel panic- can't find fs".
I do have a few more partitions but usually mount them using gigalo.
User avatar
Akuna
Salix Wizard
Posts: 1038
Joined: 14. Jun 2009, 12:25

Re: lilo, dual boot with 13.0 and 13.1beta

Post by Akuna »

pevsner wrote:I do have a few more partitions but usually mount them using gigalo.
Actually, this info could be useful as well. Could you also give me the output of fdisk -l?
Tx
I tried adding a space before " as you recommended but still get "kernel panic- can't find fs".
Yes, it wouldn't change anything in this particular situation since it is the last boot parameter to be added to the boot parameter list. But in general it is best practice to keep one blank space at the end of any append= or addappend= lines to allow for eventual further appending without syntax errors caused by some parameters being stuck together & therefore not being recognized.
Image
What really matters is where you are going, not where you come from.
pevsner
Posts: 81
Joined: 12. Apr 2010, 16:08

Re: lilo, dual boot with 13.0 and 13.1beta

Post by pevsner »

fdisk -l output:

Code: Select all

Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0710aa27

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        3435    27591606   83  Linux
/dev/hda2            3436       17352   111788302+   5  Extended
/dev/hda3           17353       18695    10787647+  83  Linux
/dev/hda4           18696       19457     6120765   82  Linux swap
/dev/hda5            3436        9049    45094423+  83  Linux
/dev/hda6            9050       11499    19679593+   7  HPFS/NTFS
/dev/hda7           13990       14754     6144831   83  Linux
/dev/hda8           11500       13989    20000893+  83  Linux
/dev/hda9           14755       17352    20868403+  83  Linux

Partition table entries are not in disk order

Disk /dev/hdb: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x43832ce7

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               2        6485    52082730    f  W95 Ext'd (LBA)
/dev/hdb2   *        7348       10011    21398580    7  HPFS/NTFS
/dev/hdb3            6486        7347     6924015   82  Linux swap
/dev/hdb5               2         713     5719108+   7  HPFS/NTFS
/dev/hdb6             714        6485    46363558+   7  HPFS/NTFS
A lot of partitions I know!!! I need to simplify the system a bit( it come's from having doubled up backups, and texture,sound libraries).
windows went along time ago. The only o/s's I have on is salix13.0 on hda3(home on hda8) and salix 13.1 on hda1(home on same partition).
Thanks for your help.
Post Reply