The definitive dual-booting guide

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Husse
Level 23
Level 23
Posts: 18677
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: The definitive dual-booting guide

Post by Husse »

Please don't shout
Selecting the default boot is maybe best done if you install bum - boot up manager and set it from there
Image
Don't fix it if it ain't broken, don't break it if you can't fix it

User avatar
markcynt
Level 6
Level 6
Posts: 1115
Joined: Sun May 17, 2009 10:53 am
Location: Lakeland Florida

Re: The definitive dual-booting guide

Post by markcynt »

I think the easiest way to accomplish what sunyata wants is to install kgrub. Bum is a nice program though.
Image
P5N-E SLI, Core2Duo E6850 3GHZ X 2
2 GB DDR2 800MHZ
EVGA 8800GTS 320MB
2x320GB Hitachi
Arctic Cooling Freezer 7 Pro

User avatar
atlef
Level 4
Level 4
Posts: 306
Joined: Sun Nov 18, 2007 8:20 am
Location: Stavanger NORWAY
Contact:

Re: The definitive dual-booting guide

Post by atlef »

Press alt + F2 and write gksu gedit /boot/grub/menu.lst and look for this part:
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0
and change default 0 to 3
Save the file, reboot and Windows should start instead of Mint.

atlef.

sunyata
Level 1
Level 1
Posts: 11
Joined: Tue Nov 04, 2008 6:17 pm

Re: The definitive dual-booting guide

Post by sunyata »

atlef:

Thanks for your reply. I pressed alt+F2 and typed in: gksu gedit /boot/grub/menu.1st (with a space before and after gedit like your sample). Then I got the following:

## timeout sec

# Set a timeout, in SEC seconds, before automatically booting the default entry

# (normally the first entry defined).

timeout 30



Below the above lines, I typed in this:

## default num 4


but it still defaults at Mint.

When I turn on the computer, it gives a menu with 5 items. Mint is at the top with the cursor sitting on it as a default.
Windows XP is in the 5th position at the very bottom. Between the 1st and 5th items are 3 other items that I don't understand; one items has something like Mint (recovery). Assuming that the default Mint at the top of the list is number 0, I typed in 4 for WindowsXP which is in 5th position.

Can you please help me by providing the words that I should type in?

Thank you in advance for your assistance.

Husse
Level 23
Level 23
Posts: 18677
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: The definitive dual-booting guide

Post by Husse »

Change default 0 to 4
You have this
# array will desync and will not let you boot your system.
default 0
Change the zero to four - and you are absolutely right about 4
You inserted
## default num 4
Luckily the ## makes it a comment - without the ## I think you get a crash....
Remove the line when you change default to 4
and beware a line beginning with just one # is not commented out
Image
Don't fix it if it ain't broken, don't break it if you can't fix it

sunyata
Level 1
Level 1
Posts: 11
Joined: Tue Nov 04, 2008 6:17 pm

Re: The definitive dual-booting guide

Post by sunyata »

Husse,

Thanks for your prompt answer. Problem was I didn't fully understand atlef's instructions. Then I poked around and finally got it. Luckily the laptop did not crash. Now that I finally got this right, I will dual boot Mint on the new Samsung NC10 netbook that I bought 2 days ago.

User avatar
atlef
Level 4
Level 4
Posts: 306
Joined: Sun Nov 18, 2007 8:20 am
Location: Stavanger NORWAY
Contact:

Re: The definitive dual-booting guide

Post by atlef »

Sorry about that, forgot to tell you that grub starts to count the entries in the list from 0. And I only have 4 entries, so mine is #3.
Good to see you got it working.

atlef.

kondor
Level 1
Level 1
Posts: 15
Joined: Sat Jul 26, 2008 8:57 pm

Re: The definitive dual-booting guide

Post by kondor »

yamawho wrote:The definitive dual-booting guide: Linux, Vista and XP step-by-step ...

http://apcmag.com/node/5162/

The definitive guide is Herman's @ http://members.iinet.net/~herman546/index.html

It is valuable for Mint since it is referenced to Ubuntu. He has an example of chainloader booting of more than 100 OS, etc. Herman also covers LILO.

To suggest that "we'll just be happy with GRUB because XP doesn't boot other systems all that well" is hardly definitive. It simply indicates that the author of the guider knows little about the XP boot loader.

There is also http://www.gnu.org/software/grub/ and other GRUB info available.

Sartorimaex
Level 1
Level 1
Posts: 2
Joined: Fri Aug 07, 2009 5:09 pm

Re: The definitive dual-booting guide

Post by Sartorimaex »

hey guys,

i've got an issue! I downloaded mint 7 today, got it on a CD and kinda insalled it within windows after trying to boot it
as it was said in several forums! Anyhow, now when switching on the computer i get to chose which one to run (visa-mint)
and if i chose mint the it starts gives me the geen screen but without any virutal buttons at all and then the screen becomes not
black but dark greyish and stays like that! What should I do?

thanx for the help

Talexe
Level 1
Level 1
Posts: 2
Joined: Wed Aug 12, 2009 5:21 am

Re: The definitive dual-booting guide

Post by Talexe »

This might be a bit of a silly question, but if I'm planning to use Linux Mint more than I use Windows XP (the two OSes I plan to have on my computer), should I allocate more than 50% of the disk to Linux or is it best to keep them 50/50?

sudharma
Level 1
Level 1
Posts: 25
Joined: Mon Aug 17, 2009 6:52 pm

Re: The definitive dual-booting guide

Post by sudharma »

May be I am Stupid . Please help with me. I am new to this OS.>

I have a deskto PC with 3 Hard Disks. Configured as:-
Sata "0" 80Gb (ubunto was on this)
Sata "1" 80Gb (Win-Xp on This)
IDE 1 (Master)160Gb. (data) & DVD Drive ( Slave).
Selecting Sata "0" or Sata "1" in the Bios boot preferance to boot Windows or Ubuntu and both the system worked ok.

I downloaded Linux Mint-7 a couple of days ago and installed on Sata "0" disk ( used the whole disk).

My problem is:-
When I start the Pc, I get the Dual Boot Linux screen with the 4 options, namely:-
Linux Mint - generic
Linux Mint (Recovery)
Mem Test
Other OS:-Win-XP

when selecting Windows OS it Loads and runs fine.
But selecting any of the Linux system, the system stops and I get the following message.:
":ERROR - 17: Cannot mount selected partition"
"Press any key to continue.
Pressing any key gives the same message again and again.

When I disconnect the Sata"1" & IDE Hard disk and reboot , the Linux Mint loads and runs OK.
How do I rectify this problem.

Previous Ubuntu Installation was working without any problem in the same configuration.
Last edited by sudharma on Fri Aug 21, 2009 6:16 pm, edited 1 time in total.

User avatar
atlef
Level 4
Level 4
Posts: 306
Joined: Sun Nov 18, 2007 8:20 am
Location: Stavanger NORWAY
Contact:

Re: The definitive dual-booting guide

Post by atlef »

Check this Mint Wiki entry, and see if that can get you back on track.

atlef.

Varg
Level 1
Level 1
Posts: 23
Joined: Wed Aug 19, 2009 9:17 am
Location: Belgium, Flandres

Re: The definitive dual-booting guide

Post by Varg »

I had the same problem. I solved it by editing the menu.lst file, as the wiki says but not in the same way. I have two hard drive: sda and sdb. Grub names them (hd0) and (hd1), only sda = (hd1) and sdb = (hd0), which is against my logic :D

So when you boot up and get the error 17, by pressing any key you go to an other boot menu. There you can edit the drive or partition to boot from by pressing "e". I changed hd(1) to hd(0) for the Linux Mint boot, then "b" and my system booted up. you can try out different combinations if it doesn't work out the first time. When you can boot succesfully, edit the menu.lst file with the correct hd(x) value. This did the trick for me without making use of UUID. However, when your kernel updates, you have to edit the menu.lst file again.

There are other post about this in more detail on this forum, but I can't find the one where I'm looking for.
The ingredients for a Mojito: white rum, sugar, lime, sparkling water, ice and Mint

sudharma
Level 1
Level 1
Posts: 25
Joined: Mon Aug 17, 2009 6:52 pm

Re: The definitive dual-booting guide

Post by sudharma »

Thanks for the prompt reply. As instructed in the Mint Wiki. I booted from the Mint CD and checked the "grub". noted down everything and restarted the PC. The PC started normally and booted into "Linux Mint". Now I am able to Dual- boot into Linux and Windows without any problem. The problem seems to have resolved somehow.
Thanks for the help..

Steelers
Level 1
Level 1
Posts: 1
Joined: Tue Sep 01, 2009 5:37 pm

Re: The definitive dual-booting guide

Post by Steelers »

Guys...new here and to Linux.

I Installed Win7 and then the latest Mint today.
Everything seemed to go ok (no errors) but when I select Mint from the loader, it boots a black screen. Again no errors, the cursor is visible and movable...but black otherwise.
Win7 boots fine when selected.

I'd prefer to use mint, but obviously need help getting it usable.
I have one SATA HD that is partitioned as follows...
System Reserve 100 MB
C: NTFS 694GB
2.32 GB
173 MB

All "healthy" partitions says Win7 disk mgmt...pls tell me what to provide so you might help me fix it.

Appreciate any and all comments...

User avatar
Fred
Level 10
Level 10
Posts: 3337
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: The definitive dual-booting guide

Post by Fred »

Varg wrote:
However, when your kernel updates, you have to edit the menu.lst file again.
When you edited the menu.lst you should have also changed the groot value. Up in the menu.lst there is a line that says:

# groot=(hd0,1)
change that to:
#groot=(hd0,0)
if that is the change you made in the boot line. groot and the boot line should match for the update to not trash your change.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.

User avatar
yamato74
Level 1
Level 1
Posts: 3
Joined: Fri Aug 08, 2008 7:25 am

Re: The definitive dual-booting guide

Post by yamato74 »

Can you people help me out on dual booting? I'm newbie both on Linux and dual booting, so bear with me please.

I have 2 Sata2 hard disks, the first one (160GB) with WindowsXP on it and a second (1TB) hard disk with nothing on it (see picture below). What configuration do you recommend for the partitions and installation procedures? I want to install Mint on the second hdd, the grub has to be installed on the first hdd to load Windows OS? Plus I have plans to install Windows7 in the future, replacing the XP on this first hdd. Is there an alternative like EasyBCD for WindowsXP to load Mint from it? Sorry for so many questions.

Helder

Image

catilley
Level 1
Level 1
Posts: 43
Joined: Thu Sep 17, 2009 10:41 pm

Re: The definitive dual-booting guide

Post by catilley »

I have dual boot on my laptop (windows 2000 pro and Linux Mint (Gloria), and I thought that was hard. I didn't know dual booting got this serious. Would a virtual machine be better?

User avatar
Lolo Uila
Level 5
Level 5
Posts: 576
Joined: Thu Mar 15, 2007 3:40 am
Location: Kapolei, Hawaii

Re: The definitive dual-booting guide

Post by Lolo Uila »

Dual booting isn't necessarily hard. You just have to understand how to use certain files.

The main files that tend be the problem (and solution) for dual boot issues are:
/boot/grub/menu.lst
/etc/fstab
/etc/initramfs-tools/conf.d/resume

and sometimes:
/boot/grub/device.map

The problem arises when you either change your hard drive configuration, or you have mixed IDE & SATA and the OS and BIOS have the drives sorted in different orders (BIOS says SATA is 1st, but OS sees IDE 1st or visa-versa). Throw a RAID controller (or 2) into the mix and things can get a little tricky. Add some removable drive trays and it can really get messy.

One way to minimise trouble, at least for Linux, is to use UUID for drive references. In most cases I feel that UUID can actually cause more problems than it solves, so for systems with simple HDD configurations (all IDE or all SATA) I usually replace UUID with /dev names. But for those complex mixed systems, using UUID will (or should) pretty much always let you boot Linux, regardless of changes to other drives in the system.

In order to properly use UUID you have to edit the following files:
/boot/grub/menu.lst
/etc/fstab
/etc/initramfs-tools/conf.d/resume

Find the UUID of your important drives.

Code: Select all

sudo blkid
With mixed IDE, SATA and 2 RAID arrays (not to mention, 2 removable trays), mine looks like this:

Code: Select all

/dev/sda1: UUID="66da8aff-0e30-4368-a937-11216d5f0f8e" TYPE="ext3" 
/dev/sda5: UUID="c3d7f578-3d20-4922-b0ac-360c78928468" TYPE="ext4" 
/dev/sda6: UUID="e3f0e690-57e9-4494-b78e-64c0287e184c" TYPE="ext2" 
/dev/sda7: UUID="460e903c-bb5d-4588-b2eb-3694e11f1159" TYPE="ext4" 
/dev/sda8: TYPE="swap" UUID="78f5974f-939f-404b-aac5-e35523b4631c" 
/dev/sdb1: UUID="8C585C10585BF802" LABEL="WINDOWS7" TYPE="ntfs" 
/dev/sdb5: UUID="1B68BE47A4A61C40" LABEL="DATA" TYPE="ntfs" 
/dev/sde1: UUID="15AE99DE50201571" LABEL="RAID300" TYPE="ntfs" 
/dev/mapper/isw_caddchdfa_RAID_Volume1: UUID="690CEA0958074AA7" LABEL="RAID600" TYPE="ntfs" 
My system originally did not have a UUID for my swap partition (not sure why), so I had turn swap off and reformat the swap partition to give it one. Anyway... my Linux boot drive is /dev/sda1 (or sdb1 depending on which trays are installed) so in order to ensure I can always boot into Linux I had to edit the files I listed above and replace all references to /dev/sda1 with UUID=66da8aff-0e30-4368-a937-11216d5f0f8e. Now, if I pull or replace my removable tray, or mess with one of the RAID arrays, Linux will still boot.

In the "/etc/fstab" file you also have to replace all other /dev/ references with their repective UUID names.

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'vol_id --uuid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sdb1 during installation
UUID=66da8aff-0e30-4368-a937-11216d5f0f8e /               ext3    relatime,errors=remount-ro 0       1
# /home was on /dev/sdb5 during installation
UUID=c3d7f578-3d20-4922-b0ac-360c78928468 /home           ext4    relatime        0       2
# /tmp was on /dev/sdb6 during installation
UUID=e3f0e690-57e9-4494-b78e-64c0287e184c /tmp            ext2    relatime        0       2
# /var was on /dev/sdb7 during installation
UUID=460e903c-bb5d-4588-b2eb-3694e11f1159 /var            ext4    relatime        0       2
# swap was on /dev/sdb8 during installation
UUID=78f5974f-939f-404b-aac5-e35523b4631c none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
# dev/fd0       /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
And after editing the "/etc/initramfs-tools/conf.d/resume" file you will have to execute

Code: Select all

sudo update-initramfs -u
to update the system.

Fixing the Windows boot after changing my drive arrangement usually involves editing the /boot/grub/menu.lst file. However, you can also hit ESCape at the grub boot menu, then hit "e" to edit the boot options for a temporary solution to boot into Windows. The relevant part of my menu.lst file is below.

Code: Select all

### END DEBIAN AUTOMAGIC KERNELS LIST

title		Windows 7 Ultimate RC1
root		(hd3,0)
map		(hd0) (hd3)
map		(hd3) (hd0)
chainloader	+1
makeactive
With both trays installed Windows thinks it's on (hd3,0). If I remove one tray (or turn off an array) then it thinks it's on (hd2,0), etc.

For a (non-permanent) quick fix Windows boot, hit ESCape from the grub boot menu. Select the Windows boot line, then hit "e" to edit the options. Hit "e" for each line and change the (hd?,?) reference as needed, then hit "b" to boot. TIP: You can use this to test which numbers need to be changed. Once you get Windows to boot correctly, you can boot into Linux and edit the "/boot/grub/menu.lst" file for a more permanent fix.

The problem with using UUID is if you replace your Linux drive, say to upgrade to a larger HDD, which will them have different UUIDs from the previous drive. If you backup from the old drive and restore to the new drive the system will not boot since it will still be looking for the old drive's UUIDs. So after the restore you will have to edit those 3 files again with the new drive's UUID data (use a Live CD and mount the root partition to do this).

This is all much easier than I probably made it look. It's one of those things you just need to do once, and then you will understand it and it will be easy. The main thing to remember is to update ALL references in the "/boot/grub/menu.lst" file (don't forget the one up near the middle of the file that starts with "# kopt=root="). And once you have updated the "/etc/initramfs-tools/conf.d/resume" file you have to sudo update-initramfs -u (this must be done from your booted Linux OS, not from a Live CD).

Of course, the simplest solution is to just never mess with your drive configurations, but for those of us with more complicated needs, editing those 3 files with the UUID labels will assure you can always boot into Linux.

breaker
Level 5
Level 5
Posts: 607
Joined: Sun Mar 16, 2008 5:28 am

Re: The definitive dual-booting guide

Post by breaker »

You can use labels instead of UUID too.
rtfm - read the fine manual...
Boot info script: http://ubuntuforums.org/showthread.php?t=1291280
grub2 https://help.ubuntu.com/community/Grub2
PC-BIOS based booting, mbr, boot records; http://thestarman.pcministry.com/

Post Reply

Return to “Installation & Boot”