LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   lilo dual boot separate hard drives ~ can't get'er done (https://www.linuxquestions.org/questions/slackware-14/lilo-dual-boot-separate-hard-drives-%7E-cant-geter-done-4175590848/)

BW-userx 10-05-2016 05:06 PM

lilo dual boot separate hard drives ~ can't get'er done
 
I have a split system as such on this laptop.

/dev/sda

Windows
Slackware

/dev/sdb

Void Linux
extra space for data storage.

I had grub2 installed by Void Linux on mbr /dev/sda
when I installed Slackware I had it install lilo on the same MBR /dev/sda

Now I am trying to get it to hook up with my /dev/sdb1/boot to get it so boot Void too,

I can't get'er to work ..

Code:

# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sda3
  label = "SlackWare 14.2"
  read-only

other = /dev/sda
label = "VOID Linux"

# Windows bootable partition config begins
other = /dev/sda1
  label = Windows
  table = /dev/sda
# Windows bootable partition config ends
# Linux bootable partition config ends

Void Linux boot dir on /dev/sdb1

Code:

userz@cheeky & ~ >>$ls /run/media/userz/4ca47bd8-7c3d-4924-904f-32486af42390/boot

System.map-4.0.5_2  config-4.7.6_1        vmlinuz-4.0.5_2
System.map-4.7.5_1  grub                  vmlinuz-4.7.5_1
System.map-4.7.6_1  initramfs-4.0.5_2.img  vmlinuz-4.7.6_1
config-4.0.5_2      initramfs-4.7.5_1.img
config-4.7.5_1      initramfs-4.7.6_1.img

it is looping now when I select void on the boot screen it just goes back to the boot screen.

the help me how to's are not helping so I am posting for help now as I have already tried a few different things and nothing is actually working completely.

thanks.

BCarey 10-05-2016 07:41 PM

Bad advice

BW-userx 10-05-2016 07:49 PM

Quote:

Originally Posted by BCarey (Post 5614457)
You need an image stanza like you have for Slackware, pointing to /dev/sdb1 and the name of the kernel you want to boot. You'll also need a line "initrd=" to point to the appropriate initramfs file.

Code:

image = /boot/name_of_kernel
  initrd = /boot/name_of_initramfs_file
  root = /dev/sdb1
  label = "VoidLinux"
  read-only

Brian

i did that more then less without that root statement let me try that now

does the other hard drive got a be mounted in fstab think that might help,
but /dev/sdb1 would not get mounted until after slackware boot so that is not logical .. pass on that thought

lilo.conf

Code:


## Void linux
image = /boot/vmlinuz-4.7.6_1
 initrd = /boot/initramfs-4.7.6_1.img
 root = /dev/sdb1
 label = "VOID Linux"


errors out
Code:

root@cheeky & userz >>$lilo
Warning: LBA32 addressing assumed
Added SlackWare_14.2  *
Fatal: open /boot/vmlinuz-4.7.6_1: No such file or directory

?

BW-userx 10-05-2016 08:03 PM

@BCarey
@bcarey
I copied the image and initramfs into slacks /boot ran lilo it took it then rebooted into void it stated it was starting void then crapped out by dropping into debug mode.

BCarey 10-05-2016 08:11 PM

Sorry, I haven't done this in a long time. I think what you need to do is install lilo on the MBR of the second disk as well and then go back to using the "other" stanza and not the image stanza I originally suggested.

BW-userx 10-05-2016 08:13 PM

Quote:

Originally Posted by BCarey (Post 5614465)
Sorry, I haven't done this in a long time. I think what you need to do is install lilo on the MBR of the second disk as well and then go back to using the "other" stanza and not the image stanza I originally suggested.

i'll give it a shot

BW-userx 10-05-2016 08:46 PM

nope lost slack but got in void due to supergrub2 it almost worked though grub2 off of void does not see my other hard drive. it went stupid after this last kernal update os-prober says not os error message on the windows parititon . exact error message forgottn, but that is a different problem.

next try reverting to my last kernal ver prior to this update see what happens.

bassmadrigal 10-05-2016 08:53 PM

I haven't dealt with chainloading much, but if that is your intention (to select the Void entry and then load Void's grub rather than booting directly to Void from lilo -- if that is, read the second section), I think you need to add a "table" entry, and your "other" was pointing to /dev/sda, which you stated Void was on /dev/sdb. I believe grub would need to be installed to the partition table instead of the MBR (but it is possible I just couldn't find a reference for it while I was searching for chainloading references).

Code:

other = /dev/sdb1
  label = "VOID Linux"
  table = /dev/sdb

If you want to just use only lilo and not chainload, you'd need to mount the partition that contains the /boot/ folder for Void into Slackware.

Code:

mount /dev/sdb1 /mnt
Then, you'd need to reference the full location to the kernel.

Code:

## Void linux
image = /mnt/boot/vmlinuz-4.7.6_1
 initrd = /mnt/boot/initramfs-4.7.6_1.img
 root = /dev/sdb1
 label = "VOID Linux"

After this, you should be able to run lilo. And you don't need to have /dev/sdb1 for normal Slackware usage, only if you need to re-run lilo.

BW-userx 10-05-2016 09:01 PM

Quote:

Originally Posted by bassmadrigal (Post 5614475)
I haven't dealt with chainloading much, but if that is your intention (to select the Void entry and then load Void's grub rather than booting directly to Void from lilo -- if that is, read the second section), I think you need to add a "table" entry, and your "other" was pointing to /dev/sda, which you stated Void was on /dev/sdb. I believe grub would need to be installed to the partition table instead of the MBR (but it is possible I just couldn't find a reference for it while I was searching for chainloading references).

Code:

other = /dev/sdb1
  label = "VOID Linux"
  table = /dev/sdb

If you want to just use only lilo and not chainload, you'd need to mount the partition that contains the /boot/ folder for Void into Slackware.

Code:

mount /dev/sdb1 /mnt
Then, you'd need to reference the full location to the kernel.

Code:

## Void linux
image = /mnt/boot/vmlinuz-4.7.6_1
 initrd = /mnt/boot/initramfs-4.7.6_1.img
 root = /dev/sdb1
 label = "VOID Linux"

After this, you should be able to run lilo. And you don't need to have /dev/sdb1 for normal Slackware usage, only if you need to re-run lilo.

I'll deal with what you just wrote tomorrow, its late here.

I got into the log in screen for VOID but lost my keyboard so I was stuck and had to power button off. then slack kernal panic about a lvm that I do not have. supergrub2 slack wouldn't boot But I got void to boot off of it. and re installed grub for void it does not pick up the other OS's for whatever reason I do not know, got a re-install slack tomarrow

enough for one day

thanks

I had copied void linux kernel img and the other files from boot into slackware /boot then changed that line from vmimage to the vmimage.4.6.etc that is when it took me to the void log in GUI screen but no keyboard then it went down hill from there. until supergrub2 got me back into void.

Richard Cranium 10-05-2016 09:40 PM

What happens when you boot Void linux and re-run grub-mkconfig? (Depending upon how Void linux is setup, that may overwrite your grub config file or simply print it to stdout.)

grub should be able to find your slackware partitions and add them to the mix.

The machine I'm on at the moment uses Slackware's grub2 to triple boot into Slackware, Ubuntu, and Windows 10.

BW-userx 10-06-2016 06:12 AM

Quote:

Originally Posted by Richard Cranium (Post 5614488)
What happens when you boot Void linux and re-run grub-mkconfig? (Depending upon how Void linux is setup, that may overwrite your grub config file or simply print it to stdout.)

grub should be able to find your slackware partitions and add them to the mix.

The machine I'm on at the moment uses Slackware's grub2 to triple boot into Slackware, Ubuntu, and Windows 10.

well it is this speradic thing that has been going on, I think it has to do more with windows 10 perhaps, but I cannot pin point the actual problem, what is causing grub2 from finding my two other OS's and sometimes it does.

the only thing i notice is that when Void upgraded the kernal it then began seeing Windows10 again, then I decided to install Void on my ssd, and keep home on the other hdd, as it was already split. then it lost everything again. Another Kernel update and when it ran update-grub in post install, it seen them again, kernel update again, and I crossed my fingers, and it still seen both OS's the old void install and Windows10, then again another kernal update and I lost Windows10 and the old Void.

seeings how Slackware went to 14.2 I got the itches to try it again just becuase I missed it, but not all of the typing to install apps, and thought lilo should fix this problem, and I get to see what improvments to Slack were, which is they got a lot more already installed now enough that I do not have to get typers cramps installing what I want now.

anyways lilo didn't solved this problem.

the same errors I get when running update-grub. Mounted the windows partition os-probe gives me that same error. logger: cannot connect: No such file or directory


Here are the complete results of grub-mkconfig in Void. Towards the end you'll see where it starts throwing errors.
Now I am going to bounce out and install Slackware again.


Code:

userx@voided.org & ~ >> $sudo  grub-mkconfig
Generating grub configuration file ...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
  set default="${next_entry}"
  set next_entry=
  save_env next_entry
  set boot_once=true
else
  set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
  font=unicode
else
insmod part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  4ca47bd8-7c3d-4924-904f-32486af42390
else
  search --no-floppy --fs-uuid --set=root 4ca47bd8-7c3d-4924-904f-32486af42390
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
Found background: /usr/share/void-artwork/splash.png
insmod part_msdos
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  4ca47bd8-7c3d-4924-904f-32486af42390
else
  search --no-floppy --fs-uuid --set=root 4ca47bd8-7c3d-4924-904f-32486af42390
fi
insmod png
background_image -m stretch /usr/share/void-artwork/splash.png
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
Found linux image: /boot/vmlinuz-4.7.6_1
Found initrd image: /boot/initramfs-4.7.6_1.img
menuentry 'Void GNU/Linux' --class void --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4ca47bd8-7c3d-4924-904f-32486af42390' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd1,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  4ca47bd8-7c3d-4924-904f-32486af42390
        else
          search --no-floppy --fs-uuid --set=root 4ca47bd8-7c3d-4924-904f-32486af42390
        fi
        echo        'Loading Linux 4.7.6_1 ...'
        linux        /boot/vmlinuz-4.7.6_1 root=UUID=4ca47bd8-7c3d-4924-904f-32486af42390 ro  loglevel=4
        echo        'Loading initial ramdisk ...'
        initrd        /boot/initramfs-4.7.6_1.img
}
submenu 'Advanced options for Void GNU/Linux' $menuentry_id_option 'gnulinux-advanced-4ca47bd8-7c3d-4924-904f-32486af42390' {
        menuentry 'Void GNU/Linux, with Linux 4.7.6_1' --class void --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.7.6_1-advanced-4ca47bd8-7c3d-4924-904f-32486af42390' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd1,msdos1'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  4ca47bd8-7c3d-4924-904f-32486af42390
                else
                  search --no-floppy --fs-uuid --set=root 4ca47bd8-7c3d-4924-904f-32486af42390
                fi
                echo        'Loading Linux 4.7.6_1 ...'
                linux        /boot/vmlinuz-4.7.6_1 root=UUID=4ca47bd8-7c3d-4924-904f-32486af42390 ro  loglevel=4
                echo        'Loading initial ramdisk ...'
                initrd        /boot/initramfs-4.7.6_1.img
        }
        menuentry 'Void GNU/Linux, with Linux 4.7.6_1 (recovery mode)' --class void --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.7.6_1-recovery-4ca47bd8-7c3d-4924-904f-32486af42390' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd1,msdos1'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  4ca47bd8-7c3d-4924-904f-32486af42390
                else
                  search --no-floppy --fs-uuid --set=root 4ca47bd8-7c3d-4924-904f-32486af42390
                fi
                echo        'Loading Linux 4.7.6_1 ...'
                linux        /boot/vmlinuz-4.7.6_1 root=UUID=4ca47bd8-7c3d-4924-904f-32486af42390 ro single
                echo        'Loading initial ramdisk ...'
                initrd        /boot/initramfs-4.7.6_1.img
        }
Found linux image: /boot/vmlinuz-4.0.5_2
Found initrd image: /boot/initramfs-4.0.5_2.img
        menuentry 'Void GNU/Linux, with Linux 4.0.5_2' --class void --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.0.5_2-advanced-4ca47bd8-7c3d-4924-904f-32486af42390' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd1,msdos1'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  4ca47bd8-7c3d-4924-904f-32486af42390
                else
                  search --no-floppy --fs-uuid --set=root 4ca47bd8-7c3d-4924-904f-32486af42390
                fi
                echo        'Loading Linux 4.0.5_2 ...'
                linux        /boot/vmlinuz-4.0.5_2 root=UUID=4ca47bd8-7c3d-4924-904f-32486af42390 ro  loglevel=4
                echo        'Loading initial ramdisk ...'
                initrd        /boot/initramfs-4.0.5_2.img
        }
        menuentry 'Void GNU/Linux, with Linux 4.0.5_2 (recovery mode)' --class void --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.0.5_2-recovery-4ca47bd8-7c3d-4924-904f-32486af42390' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd1,msdos1'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  4ca47bd8-7c3d-4924-904f-32486af42390
                else
                  search --no-floppy --fs-uuid --set=root 4ca47bd8-7c3d-4924-904f-32486af42390
                fi
                echo        'Loading Linux 4.0.5_2 ...'
                linux        /boot/vmlinuz-4.0.5_2 root=UUID=4ca47bd8-7c3d-4924-904f-32486af42390 ro single
                echo        'Loading initial ramdisk ...'
                initrd        /boot/initramfs-4.0.5_2.img
        }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
logger: cannot connect: No such file or directory
logger: cannot connect: No such file or directory
logger: cannot connect: No such file or directory
logger: cannot connect: No such file or directory
logger: cannot connect: No such file or directory
logger: cannot connect: No such file or directory
logger: cannot connect: No such file or directory
logger: cannot connect: No such file or directory
logger: cannot connect: No such file or directory
logger: cannot connect: No such file or directory
logger: cannot connect: No such file or directory
logger: cannot connect: No such file or directory
logger: cannot connect: No such file or directory
logger: cannot connect: No such file or directory
logger: cannot connect: No such file or directory
logger: cannot connect: No such file or directory
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
done

well I didn't hop out yet, I decided to look at /etc/grub.d/30_os-prober it doesn't state windows 10 so I'm going to mod it to windows 10 and run it again and see what I see.

Code:

EOF
      fi

      case ${LONGNAME} in
        Windows\ Vista*|Windows\ 7*|Windows\ Server\ 2008*)
        ;;
        *)
          cat << EOF
        drivemap -s (hd0) \${root}
EOF
        ;;
      esac

      cat <<EOF
        chainloader +1
}
EOF

I modded that file to this and still same error

Code:

Windows\ Vista*|Windows\ 7*|Windows\ 10*|Windows\ Server\ 2008*)


All times are GMT -5. The time now is 02:05 PM.