LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-19-2010, 01:48 PM   #1
niklo
LQ Newbie
 
Registered: Nov 2010
Posts: 13

Rep: Reputation: 0
Question Dual booting win7 starter / slackware 13.1


Hi!

I've succeeded after some time to install slackware on my Asus Eee 1005px netbook from a USB stick, but now I have another problem..

How do I get to choose what OS to boot? Windows 7 just keeps booting just as it did before I installed Slackware.

I got it with Win 7 Starter edition installed, I only have one disk, split into three partitions.

/dev/sda1 WINDOWS 7
/dev/sda2 LINUX SWAP
/dev/sda3 LINUX

I've read many different posts and guides that is about GRUB and LILO but from what I understand you need to set them up from Linux CLI. Can I use the USB stick with Slackware on that I used to install? And would anyone point me in the direction of a guide, not to complicated

I understand if you're thinking "what an idiot, how is he gonna learn how to use Slack if he can't even get it to boot?!"

I have just started to try to "use" linux, I just want it to boot so that I can start exploring and learning, the best way to learn in my opinion. Also I'm reading everything about Linux/Unix and X that I can get my hands on, including the slackbook. I've been using Windows for maybe 15 years so have patience with me
 
Old 11-19-2010, 01:54 PM   #2
impert
Member
 
Registered: Feb 2009
Posts: 282

Rep: Reputation: 53
Hi,
You don't say whether you have Lilo, Grub "legacy" or Grub 2.
Generally if you hit the escape key while booting (but after the Bios screens) you will get to a menu.
Quote:
I understand if you're thinking "what an idiot, how is he gonna learn how to use Slack if he can't even get it to boot?!"
Not at all. There are many little pitfalls that are trivially easy when you know - and impossible to guess if you don't.
 
1 members found this post helpful.
Old 11-19-2010, 02:13 PM   #3
niklo
LQ Newbie
 
Registered: Nov 2010
Posts: 13

Original Poster
Rep: Reputation: 0
I use none of them, I don't know how to set them up, everything I have read about GRUB and LILO tells me how to set them up from linux CLI with linux commands. Can I boot linux with the USB stick that contains the Slackware 13.1 iso which I used to install Slackware and set up GRUB or LILO from there? If so which one would you recommend?
 
Old 11-19-2010, 02:50 PM   #4
bonixavier
Member
 
Registered: Sep 2010
Distribution: Slackware
Posts: 320

Rep: Reputation: 60
Hi niklo!

Boot from your Slackware DVD. After you login as root, type
Code:
mount /dev/sda3 /mnt
mount -t proc none /mnt/proc
mount -o bind /dev /mnt/dev
chroot /mnt
liloconfig
Then you choose simple. After you're done, type
Code:
exit
cd
umount /mnt/proc
umount /mnt/dev
umount /dev/sda3
reboot
I don't remember right now if you can type reboot from the DVD. If you can't, just press ctrl+alt+del. Tell us if it works.

Last edited by bonixavier; 11-19-2010 at 02:59 PM. Reason: Forgot to tell him to mount proc and dev
 
Old 11-19-2010, 03:29 PM   #5
niklo
LQ Newbie
 
Registered: Nov 2010
Posts: 13

Original Poster
Rep: Reputation: 0
I did as you told me and it returned the following error message:

Warning /proc/partitions does not exist disc scan bypassed.
Warning Unable to determine video adapter in use in the present system.
Warning Video adapter does not support VESA BIOS extensions needed for display of 256 colors. Boot loader will fall back to TEXT only operation.
Syntax error at or above line 68 '/etc/lilo.conf'

Sorry but the attempt to install LILO has returned and error, so LILO has not been correctly installed. You'll have to use a bootdisk to start your machine instead. It should still be possible to get LILO working by editing /etc/lilo.cong and reinstalling LILO manually. See the LILO man page and documentation in /usr/doc/lilo for more help. The error message may be seen above.


(If it makes any difference I did not boot from a DVD since my netbook doesn't have a CD/DVD-rom, I used the USB stick containing the Slackware 13.1 64-bit iso that I used to install Slack.)

Last edited by niklo; 11-19-2010 at 03:32 PM. Reason: forgot
 
Old 11-19-2010, 03:35 PM   #6
bonixavier
Member
 
Registered: Sep 2010
Distribution: Slackware
Posts: 320

Rep: Reputation: 60
Sorry it didn't work. Someone more knowledgeable will come here anytime and help you more.
 
Old 11-19-2010, 04:29 PM   #7
mcnalu
Member
 
Registered: Dec 2006
Location: Glasgow, UK
Distribution: Slackware 13.37 and 13.1
Posts: 393

Rep: Reputation: 63
Try bonixavier's method again but instead of chrooting and mounting dev and proc, edit the lilo.conf file so that any mention of /boot/vmlinuz is replaced by /mnt/boot/vmlinuz.

Last edited by mcnalu; 11-19-2010 at 04:32 PM. Reason: premature posting
 
Old 11-19-2010, 04:56 PM   #8
2handband
Member
 
Registered: Jan 2009
Location: Alexandria, Minnesota
Distribution: Slackware 13.1
Posts: 809

Rep: Reputation: 96
I don't dual-boot, so I can't help you much with this specific problem. But since you're a noob I'd like to invite you to check out my Linux website, which is linked in my signature. It's undergoing a major revision right now, because when I wrote the lessons I was using Debian and have since switched to Slack. In the next three or four days I expect to have some basic Slackware-oriented installation/setup lessons in place. I'm not the greatest hacker in the world, but I'm a pretty damn good writer and teacher.
 
Old 11-19-2010, 08:31 PM   #9
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 797

Rep: Reputation: 247Reputation: 247Reputation: 247
There are basically two ways you can configure dual booting.
  • Windows "bootmgr" starts first
  • Linux "grub" or "lilo" starts first

On a netbook you also have the problem that fixing boot problems with Windows is not easy unless you have a USB CD-ROM drive and Windows Setup disc.

What I recommend is that you leave Windows "bootmgr" as the first boot loader to start and add a menu entry to start Linux.

It's easier to do that using GRUB because you won't have to update the boot sector every time that you make a change in the Linux kernel or Linux boot menu.

Here is a link to an explanation that I posted about how to do that in Ubuntu. The process in Slackware is the same, except that you must install the GRUB package for Slackware.

Installing GRUB as a Windows boot menu choice

Notice that you have to make a copy of the boot block for GRUB.

To set up the GRUB boot block from your Linux USB Thumb drive, boot the thumb drive for Slackware setup.

Then mount your Slackware partition. My instructions below assume that Slackware is the third Primary partition on the Internal hard disk.

Code:
mount /dev/sda3 /mnt
chroot /mnt
mount -t proc none /proc
mount -t sysfs none /sys
Install the GRUB package for Slackware. Copy the required files to "/boot/grub".

Code:
mkdir /boot/grub
cd /boot/grub
cp /usr/lib/grub/i386-pc/* .
Set up GRUB to start from the Third primary partition's boot sector.

Code:
grub
root (hd0,2)
setup (hd0,2)
quit
Use a text editor to create a "menu.lst" file for grub.

Code:
cd /boot/grub
nano menu.lst
In "menu.lst" you need a boot entry to start Linux. The entry to start Windows is optional if Windows "bootmgr" will be starting first.

Code:
default 0
timeout 5

title Linux
root (hd0,2)
kernel /boot/vmlinuz root=/dev/sdr3 ro vt.default_utf8=0

title Windows 7
rootnoverify (hd0,0)
chainloader +1
Now you make a copy of the Linux partition's boot sector. You can skip this step if you will always start the Linux boot manager first.

Code:
dd if=/dev/sda3 of=/tmp/bootsect.lnx bs=512 count=1
Copy the "/tmp/bootsect.lnx" file to something that Windows can read, such as a thumb drive with an "NTFS", "FAT32" or "FAT16" filesystem.

Unmount the Slackware partition.

Code:
umount /sys
umount /proc
exit
umount /mnt
The rest of these steps can be skipped if you always boot the Linux bootloader first.

Boot Windows 7. It should still be the first (default) bootloader.

Copy the "bootsect.lnx" file to the root of drive C:

Click the start menu button, click "All Programs" then click "Accessories". Look for the "Command Prompt" in the menu. Right click the mouse on "Command Prompt" and then click the left mouse button on "Run as administrator".

Use the "bcdedit" program to add a Linux to the Windows boot menu.

Code:
bcdedit /create /d "Slackware Linux" /application bootsector
Note the long number displayed for the ID of the new entry. You can drag the mouse cursor over it and copy it to the clipboard so that you can paste into commands. Replace "ID" below with the actual ID number displayed.

Code:
bcdedit /set {ID} device partition=c:
bcdedit /set {ID} path \bootsect.lnx
bcdedit /displayorder {ID} /addlast
If you want a different time-out for the menu besides 30 seconds then set the time-out.

Code:
bcdedit /timeout 5
Replace the "5" with the number of seconds that the menu should be displayed before the default is chosen automatically.

You only have to do these things once unless you reinstall GRUB. Then create a new "bootsect.lnx" and copy it to the root of drive C:

If you use LILO that will work, but remember to update "bootsect.lnx" every time that you edit "lilo.conf" and run "lilo". Copy the updated "bootsect.lnx" to the root of drive C:

If you want to use a Windows program to save the boot sector file directly, then you can download the Windows XP Support tools and run the "DSKPROBE" utility. That will let you read from a sector and save it in a file but it is a bit more complicated than using "dd" in Linux. The only reason to do that is if you have absolutely no way to get the Linux "/tmp/bootsect.lnx" file over to Windows.

If you want the Linux bootloader to start first, use "fdisk" or "cfdisk" in Linux. Clear the "Boot" flag for the first Primary partition (Windows) and set the "Boot" flag for the Third Primary partition (Linux). Also, make sure that you add Windows to the "menu.lst" file. This is safer than installing GRUB to the MBR because you can easily change it back to make Windows boot first. If you delete the Linux partition, remember to change the "Boot" flag back to the first partition.

Installing GRUB or LILO to the MBR is not necessary because you can install the Linux boot-loader to the Linux partition and make that the "Boot" partition.

I usually do all of the steps that I provided so that I can change which bootloader starts first and still always get to the other bootloader.
 
Old 11-20-2010, 07:23 AM   #10
mcnalu
Member
 
Registered: Dec 2006
Location: Glasgow, UK
Distribution: Slackware 13.37 and 13.1
Posts: 393

Rep: Reputation: 63
niklo, Can I ask what you did during the initial install when the installer asked about installing lilo (or indeed in liloconfig)?

I recently installed slackware onto a laptop with Win7 Home Premium pre-installed and managed to get it dual booting fairly easily. From memory, this was my approach:
  1. I made sure I had the windows 7 install/rescue disk to restore the windows bootloader if something went wrong
  2. I just let the installer install lilo to the MBR. It wiped the existing windows boot loader (you can do exactly the same post-install with liloconfig)
  3. I then rebooted into slackware
  4. I added these lines to the file /etc/lilo.conf created by liloconfig, after the slackware section because I wanted slackware to be the default:
    Code:
    other = /dev/sda1
    label = win7
  5. I then ran lilo -t -v to test for errors (a few warnings are probably ok)
  6. Then, all being well, lilo -v and then I had a dual booting set up

Erik_fl's grub instructions look excellent but, in my experience, installing lilo and getting dual booting working with windows is quite straightforward.
 
Old 11-20-2010, 12:23 PM   #11
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 797

Rep: Reputation: 247Reputation: 247Reputation: 247
Quote:
Originally Posted by mcnalu View Post
Erik_fl's grub instructions look excellent but, in my experience, installing lilo and getting dual booting working with windows is quite straightforward.
Installing lilo should be straightforward, but be careful about removing Linux later. If you remove the Linux partition you must first rewrite (repair) the Master Boot Record to put back the default MBR software. You can do that with a Windows Setup CD and the "BOOTREC /FIXMBR" command, or other programs such as "MBRWIZ" or "MBRFIX".

When installing lilo or grub they may make a backup of the MBR sector. In that case you can restore the saved MBR sector before removing the Linux partition. That only works if you have not changed your partition layout or sizes after installing Linux.

Although many Linux distros install the boot loader to the MBR by default, I don't think that is a very good choice. The reason for a separate MBR and partition table is so that operating systems do not interfere with each other. The standard way to install an operating system is for it to use the boot sector in its partition. Then if you want that operating system to start first, the "Active" boot flag serves that purpose.

Since the MBR is often the default, it is usually simpler to install to the MBR. It is also more complicated and less safe to remove Linux later. On a netbook repairing the MBR can be difficult because there is often no CD/DVD drive.

How you decide to install your boot-loader is up to you. I only suggest that you think about that choice and understand the removal issues when using the MBR. The beauty of Linux is that there are many ways to do things and we are all free to do what we think is best in our situation.
 
1 members found this post helpful.
Old 11-20-2010, 01:03 PM   #12
mcnalu
Member
 
Registered: Dec 2006
Location: Glasgow, UK
Distribution: Slackware 13.37 and 13.1
Posts: 393

Rep: Reputation: 63
@erik_fl completely agree - I'm just presenting what's worked well for me. I make no claim that it's the only or even the best way, but I can recommend it from firsthand experience.
 
Old 11-20-2010, 02:34 PM   #13
igb
LQ Newbie
 
Registered: May 2009
Location: Turkey/İstanbul
Distribution: slackware-current
Posts: 21

Rep: Reputation: 0
Quote:
Originally Posted by niklo View Post
Syntax error at or above line 68 '/etc/lilo.conf'
after the 'chroot /mnt' can you check your /etc/lilo.conf file
here is mine (i use slack and win7)
you can just change the partitions, run lilo and then reboot
just compare this with your /etc/lilo.conf especially the parts after # End LILO global section

Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" vt.default_utf8=0 resume=/dev/sda6"
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 = 100
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
# VESA framebuffer console @ 1024x768x64k
vga = 791
# 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
  root = /dev/sda5
  label = Linux
  read-only
#image = /boot/bzImage-2.6.33.4-smp2
#  root = /dev/sda5
#  label = NewKernel
#  read-only

# Linux bootable partition config ends


# Windows bootable partition config begins
other = /dev/sda1
  label = Windows
  table = /dev/sda
# Windows bootable partition config ends
 
Old 11-20-2010, 03:02 PM   #14
impert
Member
 
Registered: Feb 2009
Posts: 282

Rep: Reputation: 53
@ Erik_FL
Quote:
Installing lilo should be straightforward, but be careful about removing Linux later. If you remove the Linux partition you must first rewrite (repair) the Master Boot Record to put back the default MBR software. You can do that with a Windows Setup CD and the "BOOTREC /FIXMBR" command, or other programs such as "MBRWIZ" or "MBRFIX".

When installing lilo or grub they may make a backup of the MBR sector. In that case you can restore the saved MBR sector before removing the Linux partition. That only works if you have not changed your partition layout or sizes after installing Linux.
I have a question - hypothetical, because I have no intention of using or installing Windows - and a comment.
Suppose I have a Windows installation, which I shrink and confine to say half my disk drive on sda1 and sda2. I then boot a linux live CD, create an extended partition sda3, and some logical partitions within it, say sda5 - sda10. I install linux to some of these, and using dd, make a backup of the MBR. Next I install Grub to the MBR, and use it to chainload Windows, and my second, third . . . nth linux distros. I then joyously delete and expand some of the logical partitions within sda3. Later I decide to use Windows to boot my linux, so I restore the (Windows) MBR with dd. I have not touched the Windows partitions sda1 and sda2. Will Windows still boot, and can I then use Windows to boot my remaining linux/linuces?
So much for the question.
For the comment. Since it is easy to chainload Windows using either Grub 1 or Grub 2, and since with chainloading no editing of grub.cfg or menu.lst is necessary, I can't see the advantage of using Windows to load linux. Even if you stopped using linux entirely, the overhead of a small boot partition with Grub 1 on it is negligible, in my view.
What do you think?
 
Old 11-20-2010, 03:13 PM   #15
igb
LQ Newbie
 
Registered: May 2009
Location: Turkey/İstanbul
Distribution: slackware-current
Posts: 21

Rep: Reputation: 0
After copying MBR with dd Windows should work (at least XP will work). I am unsure about Windows 7.
I don't know how you can load your Linux'es through windows loader.I have never done that.
I also don't use grub. Only lilo.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Booting Slackware, best Slackware based Distro, and Partitioning...? Novatian Slackware 6 06-07-2010 08:09 PM
What does a Win7 user need to know before installing dual-boot Slackware 13? ZXDunny Linux - Newbie 27 05-31-2010 05:07 AM
Gdesklet Iconbar : creating new starter in starter bar impossible, permission denied cloudmilk Linux - Desktop 1 03-09-2010 12:54 PM
Dual Boot Slackware 13 with FreeBSD, but Issue Dual Booting PC-BSD Photon Blizzard *BSD 2 11-09-2009 11:55 AM
Dual Boot Slackware 13 with FreeBSD, but Issue Dual Booting PC-BSD Photon Blizzard Linux - Newbie 1 10-22-2009 10:07 PM


All times are GMT -5. The time now is 09:27 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration