Debian This forum is for the discussion of Debian Linux.
|
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
01-29-2004, 05:59 PM
|
#1
|
Member
Registered: Feb 2003
Location: UK
Distribution: Currently Fedora Core 3
Posts: 136
Rep:
|
Can anyone help me set up dual boot?
Having been a member of this forum myself for a bit now, I realise the correct and easiest way of setting up a dual boot system is to install Windows first. However, I have installed the Knoppix/Debian CD to hard drive with a view to installing VMware for Windows as I very rarely use Windows. I have also set up a wireless network which no matter what I do will not configure in Linux nor will VMware recognise it. Therefore, I have had to reinstall Windows on a spare partition leaving my linux partitions in tact. Now all I need to do is reinstall the linux bootloader to enable me to boot either. This is easier said than done so if anyone can help me, please let me know how I should go about it. Thanks.
|
|
|
01-29-2004, 07:35 PM
|
#2
|
Member
Registered: Jun 2003
Location: Warwick (.ac.uk)
Distribution: Arch, Slackware 9.0, (knoppix standing by)
Posts: 256
Rep:
|
if you can boot into linux with a floppy, you should just need to add an entry for your new windows partition. If you're using lilo, edit /etc/lilo.conf then you then should just need to run /sbin/lilo and it will be reinstalled. I don't know about grub i'm afraid.
|
|
|
01-29-2004, 09:18 PM
|
#3
|
Member
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402
Rep:
|
Your post was convoluted. Be specific. In Debian, what is your problem? Wireless? How about your hardware, kernel, logs, attempts?
|
|
|
01-30-2004, 10:28 AM
|
#4
|
Member
Registered: Feb 2003
Location: UK
Distribution: Currently Fedora Core 3
Posts: 136
Original Poster
Rep:
|
I have given up on the wireless after finding I need to recompile the kernel and some of my apps run sluggishly in vmware anyway despite my system more than being capable of running it. All I want to do now is dual boot between Debian & Windows but when I installed Windows it rewrote the MBR and now I cannot get linux to boot. It is all there on its own partition but my machine boots straight to windows. All I need to do is rewrite lilo. However, I have followed the instructions above but got an error advising me to edit /etc/lilo.conf when I tried to run /sbin/lilo. I had already edited it. All I had done was change the end of the file to read;
other=/dev/hda3
label=windows xp
restricted
alias=3
The error was telling me to edit the file on or before line 20. No matter what I do it will not run lilo. Now I'm thinking that grub was previously installed before. But surely that won't matter as grub would have been overwritten with windows anyway. Any help is appreciated. I would copy my lilo.conf file but it won't let me copy and paste.
|
|
|
01-30-2004, 10:36 AM
|
#5
|
Member
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402
Rep:
|
I don't dual boot with windows, but wouldn't the label= line need to NOT have a space? Or put in quotes?
If you can't paste lilo.conf you could tell us what line 20 is.
|
|
|
01-30-2004, 11:09 AM
|
#6
|
Member
Registered: Feb 2003
Location: UK
Distribution: Currently Fedora Core 3
Posts: 136
Original Poster
Rep:
|
Deleted the space to read label=windows but no difference same error.
The error I get reads;
Unrecognised Token "! Please edit /etc/lilo.conf before running lilo !" at or above line 20 in file '/etc/lilo.conf'
When I select go to line 20 in lilo.conf it goes to the line below support for LBA and a line that reads
Overrides the default mapping between harddisk names and the BIOS harddisk order. Use with caution.
disk=/dev/hde
bios=0x81
disk=/dev/sda
bios=0x80.
All this info from line 20 relating to overriding defaults and the disk and bios settings following it are all commented out and have not been changed by me. Whether they need to I'm not sure.
|
|
|
01-30-2004, 11:47 AM
|
#7
|
Member
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402
Rep:
|
why is there a . after bios=0x80 ???
We really could help more with your problem if we could see lilo.conf
|
|
|
01-30-2004, 05:23 PM
|
#8
|
Member
Registered: Feb 2003
Location: UK
Distribution: Currently Fedora Core 3
Posts: 136
Original Poster
Rep:
|
Managed to do cut and paste without saving of course and this allows you to paste - learn something new every day. Here is the lilo.conf file;
vga=791
# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',
# --------------- `install-mbr(8)', `/usr/share/doc/lilo/',
# and `/usr/share/doc/mbr/'.
# +---------------------------------------------------------------+
# | !! Reminder !! |
# | |
# | Don't forget to run `lilo' after you make changes to this |
# | conffile, `/boot/bootmess.txt', or install a new kernel. The |
# | computer will most likely fail to boot if a kernel-image |
# | post-install script or you don't remember to run `lilo'. |
# | |
# +---------------------------------------------------------------+
# Support LBA for large hard disks.
#
lba32
# Overrides the default mapping between harddisk names and the BIOS'
# harddisk order. Use with caution.
#disk=/dev/hde
# bios=0x81
#disk=/dev/sda
# bios=0x80
# Specifies the boot device. This is where Lilo installs its boot
# block. It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
#
boot=/dev/hda
# Specifies the device that should be mounted as root. (`/')
#
root=/dev/hda
# Enable map compaction:
# Tries to merge read requests for adjacent sectors into a single
# read request. This drastically reduces load time and keeps the
# map smaller. Using `compact' is especially recommended when
# booting from a floppy disk. It is disabled here by default
# because it doesn't always work.
#
# compact
# Installs the specified file as the new boot sector
# You have the choice between: bmp, compat, menu and text
# Look in /boot/ and in lilo.conf(5) manpage for details
#
install=/boot/boot-menu.b
# Specifies the location of the map file
#
map=/boot/map
# You can set a password here, and uncomment the `restricted' lines
# in the image definitions below to make it so that a password must
# be typed to boot anything but a default configuration. If a
# command line is given, other than one specified by an `append'
# statement in `lilo.conf', the password will be required, but a
# standard default boot will not require one.
#
# This will, for instance, prevent anyone with access to the
# console from booting with something like `Linux init=/bin/sh',
# and thus becoming `root' without proper authorization.
#
# Note that if you really need this type of security, you will
# likely also want to use `install-mbr' to reconfigure the MBR
# program, as well as set up your BIOS to disallow booting from
# removable disk or CD-ROM, then put a password on getting into the
# BIOS configuration as well. Please RTFM `install-mbr(8)'.
#
# password=tatercounter2000
# Specifies the number of deciseconds (0.1 seconds) LILO should
# wait before booting the first image.
#
delay=20
# You can put a customized boot message up if you like. If you use
# `prompt', and this computer may need to reboot unattended, you
# must specify a `timeout', or it will sit there forever waiting
# for a keypress. `single-key' goes with the `alias' lines in the
# `image' configurations below. eg: You can press `1' to boot
# `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'.
#
# message=/boot/bootmess.txt
# prompt
# single-key
# delay=100
# timeout=100
# Kernel command line options that apply to all installed images go
# here. See: The `boot-prompt-HOWO' and `kernel-parameters.txt' in
# the Linux kernel `Documentation' directory.
#
# append=""
append="hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi apm=power-off nomce"
# Boot up Linux by default.
#
default=Linux
image=/boot/vmlinuz-2.4.22-xfs
label=Linux
initrd=/boot/initrd.gz
read-only
restricted
alias=1
image=/vmlinuz.old
label=LinuxOLD
read-only
optional
restricted
alias=2
# If you have another OS on this machine to boot, you can uncomment the
# following lines, changing the device name on the `other' line to
# where your other OS' partition is.
#
other=/dev/hda3
label=WINDOWS
restricted
alias=3
Thanks for your help.
|
|
|
01-30-2004, 05:34 PM
|
#9
|
Member
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402
Rep:
|
Yep. you don't say what the root partition is.
# Specifies the device that should be mounted as root. (`/')
#
root=/dev/hda
should be
root=/dev/hdaX
where X is the linux / root filesystem partition.
edit, run lilo -v, reboot and enjoy.
|
|
|
01-30-2004, 05:55 PM
|
#10
|
Member
Registered: Feb 2003
Location: UK
Distribution: Currently Fedora Core 3
Posts: 136
Original Poster
Rep:
|
Tried every single partition but got the same error message after each one, it's as though there isn't a root filesystem partition and yet it worked prior to installing windows. Would it be easier just insalling grub and if so how do i do it?
|
|
|
01-30-2004, 06:32 PM
|
#11
|
Member
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402
Rep:
|
No, installing Grub won't make it any easier. You'll need to know what the root partition actually is, provided you didn't destroy it when installing Windows. You could boot with a Knoppix cd and poke around, or use the Debian Woody install cd and type rescbf24 at the prompt. You will still need to know the root partition. Any way you could let us see your /etc/fstab?
|
|
|
01-30-2004, 06:48 PM
|
#12
|
Member
Registered: Feb 2003
Location: UK
Distribution: Currently Fedora Core 3
Posts: 136
Original Poster
Rep:
|
The root partition is definitely hda2 as I am using a knoppix cd now and also tried booting with debian cd using rescue mode.
rescue root=/dev/hda2 will boot into a shell but no other partition will boot, i get a kernel error for all other attempts other than hda2. Here's the fstab file;
# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/hda3 / ext3 defaults,errors=remount-ro 0 1
proc /proc proc defaults 0 0
/dev/fd0 /floppy vfat defaults,user,noauto,showexec,umask=022 0 0
/dev/cdrom /cdrom iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/dvd /dvd iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/cdaudio /cdaudio iso9660 defaults,ro,user,noexec,noauto 0 0
# Added by KNOPPIX
/dev/hda1 none swap defaults 0 0
# Added by KNOPPIX
/dev/hda2 /mnt/hda2 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hda4 /mnt/hda4 ext2 noauto,users,exec 0 0
cheers.
|
|
|
01-30-2004, 07:08 PM
|
#13
|
Member
Registered: Nov 2003
Distribution: Debian & Ubuntu
Posts: 402
Rep:
|
according to your fstab, root is hda3. Is that incorrect? Have you chrooted into /dev/hda2 yet to make sure everything is there?
|
|
|
01-31-2004, 05:34 AM
|
#14
|
Member
Registered: Feb 2003
Location: UK
Distribution: Currently Fedora Core 3
Posts: 136
Original Poster
Rep:
|
Amended fstab to read hda2. I have browsed hda2 and my home directory, everything is okay there. Tried to rerun lilo but still got the same error message. Now thinking about copying my home directory into the windows partition for safety and then reinstalling linux again by deleting all partitions except for the windows one and using up the free space for a fresh install. I then can copy the home directory back once completed. Alternately burn it to a rewritable cd but not sure if that option is possible as it maybe to big.
|
|
|
01-31-2004, 10:00 AM
|
#15
|
Member
Registered: Feb 2003
Location: UK
Distribution: Currently Fedora Core 3
Posts: 136
Original Poster
Rep:
|
Copied my home directory to the root of my windows partition, repaired windows and reinstalled the mbr with windows xp cd so i could boot into windows, all oksy so far. Reinstalled linux and rebooted system, lilo came up giving me option of linux or windows. Booted to linux made windows partition writable copied home directory back and all is fine now. Can access both. Thought this would be easiest way as it would appear that something had gone wrong before, would have been nice to fix it, good acchievement and all that but the more we got into it the more it could have been something else. Thanks for all your help anyway, IIamakc, much appreciated.
|
|
|
All times are GMT -5. The time now is 06:41 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|