Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Wait. What this has to do with Slackware boot? You didnt mention anything related to dual boot in the beginning. Tell me exactly what you are trying to do?
I installed slackware about a week ago and I can't get it to boot up unless I use a USB thumb drive. Originally I was trying to get LILO to work, but I've given up on that. I got to the point where I get a grub splash screen with options to boot either Ubuntu or Slackware. Ubuntu works fine, but when I try to boot slackware, I get error messages.
One more thing- why do my device names keep swapping. It happened again. I think that's part of the problem. Remember when you had me do fdisk -l. I ran it again, look at this output and compare it to the last output:
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9328 74920960 83 Linux
/dev/sdb2 9328 9730 3227649 5 Extended
/dev/sdb5 9328 9730 3227648 82 Linux swap / Solaris
The way that I know of to avoid this is to use UUID which we have already done. Appears to be some setting in BIOS which might be causing this.
As far as dual boot is concerned I have never worked on Slackware. I am not sure how Ubuntu + Slackware dual boot works. I can give it a try though if you could paste the output of:
Is it still considered a dual boot if I have slackware and ubuntu on different hard drives?
Quote:
#
# 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
set have_grubenv=true
load_env
fi
set default="0"
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 recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
insmod vbe
insmod vga
}
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a97e6722-7e13-4f56-a96f-e46a841a29c6
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a97e6722-7e13-4f56-a96f-e46a841a29c6
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-30-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a97e6722-7e13-4f56-a96f-e46a841a29c6
linux /boot/vmlinuz-2.6.35-30-generic root=UUID=a97e6722-7e13-4f56-a96f-e46a841a29c6 ro quiet splash
initrd /boot/initrd.img-2.6.35-30-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-30-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a97e6722-7e13-4f56-a96f-e46a841a29c6
echo 'Loading Linux 2.6.35-30-generic ...'
linux /boot/vmlinuz-2.6.35-30-generic root=UUID=a97e6722-7e13-4f56-a96f-e46a841a29c6 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-30-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a97e6722-7e13-4f56-a96f-e46a841a29c6
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=a97e6722-7e13-4f56-a96f-e46a841a29c6 ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a97e6722-7e13-4f56-a96f-e46a841a29c6
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=a97e6722-7e13-4f56-a96f-e46a841a29c6 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a97e6722-7e13-4f56-a96f-e46a841a29c6
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a97e6722-7e13-4f56-a96f-e46a841a29c6
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Linux (on /dev/sdb1)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set 54915623-8ff7-4b43-8c41-94485063590f
linux /boot/vmlinuz root=/dev/root ro vt.default_utf8=0 vga = normal
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
menuentry "Slackware on sdb1" {
set root=(hd1,1)
insmod chain
chainloader +1
}
# 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 $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
Where did you install Lilo, the root partition for Slackware, sdb1?
What's on the usb you say you can boot Slackware with?
Quote:
*sigh* same results.
That's not much help. The os-prober and update-grub will give some output. What did you get? We know you still can't boot Slackware but it might help if you indicated whether you got errors from the commands or it indicated success and you still can't boot.
You can get much more detailed information to post by running the bootinfoscript. Just google it, go to the site, read the documentatio on using it, download it and run it.
It looks to me like you missconfigured your /etc/grub.d/40-custom file: The exec tail line is not the first line in the file as the comments seem to require.
If I read your grub.cfg file correctly, you have two Slackware boot menu entries. With which one are you having a problem?
The custom one seems to want to chain boot LILO on /dev/sdb, and the other attempts to start Slackware by loading and running the vmlinuz image, with the root=/dev/root option. That looks like it's just what LILO is doing, but - if that's the menu entry you're using, your problem may be (this is just a guess) that the root parameter is not being processed in the "correct" order.
grub doesn't use /etc/fstab -- that's for the os grub's going to boot, not grub itself. grub usually gets its startup from /boot/grub/grub.cfg. Since you can boot to ubuntu, I'm guessing grub's booting from /boot/grub/grub.cfg on the ubuntu disk. Post its contents? I don't know grub well enough (at all) to promise anything, but I've had some experience browbeating it into doing what I want and whoever does shoot this will need it.
You said sda and sdb have switched places. Did that happen just once, or every time, or only when you haven't laughed in the last five minutes, or what? Is there a /boot/grub/grub.cfg on the other disk too? (if so, post that one too). What happens if you wait a minute before trying to boot slack (hit an arrow key or something to stop the autoboot timer)? What version of ubuntu are you on? Also please post the output of `grub-install -v`. You may wind up installing grub-doc and spending some quality time with `info grub`.
It looks to me like you missconfigured your /etc/grub.d/40-custom file: The exec tail line is not the first line in the file as the comments seem to require.
If I read your grub.cfg file correctly, you have two Slackware boot menu entries. With which one are you having a problem?
The custom one seems to want to chain boot LILO on /dev/sdb, and the other attempts to start Slackware by loading and running the vmlinuz image, with the root=/dev/root option. That looks like it's just what LILO is doing, but - if that's the menu entry you're using, your problem may be (this is just a guess) that the root parameter is not being processed in the "correct" order.
The first two lines in 40_custom are:
#!/bin/sh
exec tail -n +3 $0
I never touched those two lines. I can't boot into either of the two slackware entires. I don't know why there's two to begin with.
Quote:
Originally Posted by jthill
grub doesn't use /etc/fstab -- that's for the os grub's going to boot, not grub itself. grub usually gets its startup from /boot/grub/grub.cfg. Since you can boot to ubuntu, I'm guessing grub's booting from /boot/grub/grub.cfg on the ubuntu disk. Post its contents? I don't know grub well enough (at all) to promise anything, but I've had some experience browbeating it into doing what I want and whoever does shoot this will need it.
You said sda and sdb have switched places. Did that happen just once, or every time, or only when you haven't laughed in the last five minutes, or what? Is there a /boot/grub/grub.cfg on the other disk too? (if so, post that one too). What happens if you wait a minute before trying to boot slack (hit an arrow key or something to stop the autoboot timer)? What version of ubuntu are you on? Also please post the output of `grub-install -v`. You may wind up installing grub-doc and spending some quality time with `info grub`.
/dev/sda and /dev/sdb switch a lot. So far I've seen it happen when updating grub and when rebooting. I have LILO installed on slackware.
Grub from ubuntu:
Code:
#
# 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
set have_grubenv=true
load_env
fi
set default="0"
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 recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
insmod vbe
insmod vga
}
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a97e6722-7e13-4f56-a96f-e46a841a29c6
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a97e6722-7e13-4f56-a96f-e46a841a29c6
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-30-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a97e6722-7e13-4f56-a96f-e46a841a29c6
linux /boot/vmlinuz-2.6.35-30-generic root=UUID=a97e6722-7e13-4f56-a96f-e46a841a29c6 ro quiet splash
initrd /boot/initrd.img-2.6.35-30-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-30-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a97e6722-7e13-4f56-a96f-e46a841a29c6
echo 'Loading Linux 2.6.35-30-generic ...'
linux /boot/vmlinuz-2.6.35-30-generic root=UUID=a97e6722-7e13-4f56-a96f-e46a841a29c6 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-30-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a97e6722-7e13-4f56-a96f-e46a841a29c6
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=a97e6722-7e13-4f56-a96f-e46a841a29c6 ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a97e6722-7e13-4f56-a96f-e46a841a29c6
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=a97e6722-7e13-4f56-a96f-e46a841a29c6 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a97e6722-7e13-4f56-a96f-e46a841a29c6
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set a97e6722-7e13-4f56-a96f-e46a841a29c6
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Linux (on /dev/sdb1)" {
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set 54915623-8ff7-4b43-8c41-94485063590f
linux /boot/vmlinuz root=/dev/root ro vt.default_utf8=0 vga = normal
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
menuentry "Slackware on sdb1" {
set root=(hd1,1)
insmod chain
chainloader +1
}
# 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 $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
Quote:
Originally Posted by rng
Probably single quote should not be there in second last line of fstab:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.