LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Vista dual boot with Linux (https://www.linuxquestions.org/questions/linux-general-1/vista-dual-boot-with-linux-536775/)

john7343 03-12-2007 06:24 AM

Vista dual boot with Linux
 
Hello, I am trying to do a dual boot of Windows Vista and Backtrack (a Linux distro).

Ive searched the forums and I am still not sure what to do and if it will work as I am quite new to this stuff.

1. Is it possible with these OS's?
2. Very briefly how is it done or where can I find instructions?

Thank you anyone
John

blackhole54 03-12-2007 07:29 AM

I have not done it myself, but I have read of many people doing it. There are two ways of doing it, and the first thing you need to do is decide which to use.

In one method, you install Backtrack's bootloader (probably GRUB, but a few distros still use LILO) onto the MBR and let it control the process when you boot. Some (many?) distros will automatically detect other OSes present and set this up for when you install. If not, google on the terms/phrases "dual boot" GRUB (or LILO), and "windows xp". If you have a Linux live CD and a floppy or USB stick handy, I would suggest first saving a copy of the existing MBR onto the removable medium so you can restore the existing MBR and be able to boot winXP again in case something goes wrong. To create a file with the existing MBR (do this before you install Backtrack! Hence doing it with a live CD.), as root:

Code:

dd if=/dev/hda of=<path/filename you are saving to> bs=512 count=1
The other method is to let XP's boot system continue handling things at boot and give you the choice of which OS to run. In this case, you install Backtrack's bootloader to the boot record on the partition where you are installing Backtrack (or onto the partition containing /boot, if that is a separate partition). You first need to create a file containing a copy of Backtrack's boot record similar to the command above. (Substitute the name of the partition with the boot record -- i.e. /dev/hda2 -- for /dev/hda). You need to copy this file to the XP partition and then modify XP's boot.ini file. For details, google on the words/phrase "boot.ini", "dual boot", and linux.

john7343 03-12-2007 07:30 AM

I managed to resize the c: partition in Vista to enable me to add a new partition although it only allows NTFS in disk management and Linux is FAT right?

Can this be changed in the backtrack install once its made NTFS in Vista?

Cheers

john7343 03-12-2007 07:37 AM

Where do I find the MBR on Vista so I can back it up?

blackhole54 03-12-2007 07:54 AM

Linux can use several different file systems. One of the common ones is ext3. Linux rarely, if ever, uses FAT for its own filesystem. When dual booting with MS systems, it is common to use an extra FAT32 partition for exchanging files between the two systems. (Historically it has been viewed as risky to write to an NTFS partition from Linux.)

The MBR is the first 512 bytes on the disk. It is not part of any partition. The dd command I gave in my first post will copy it.

pixellany 03-12-2007 08:00 AM

Quote:

Originally Posted by john7343
Where do I find the MBR on Vista so I can back it up?

The mbr is in the same place for any OS---the first sector of the first drive. To back it up, you need a low-level copy routine such as dd in Linux. If you have not yet installed Linux, you could do it from a "live CD"---Do you have that with Backtrack? If not, you can get the Knoppix live cD distro--a handy thing to have for many reasons.

To put the mbr boot code on a floppy:
(assumes IDE drive---for SATA or SCSI, change hda to sda)
dd if=/dev/hda of=/dev/fd0 bs=446 count=1

Running from live CD, I would first do fdisk -l to make sure how the drives are being seen by the OS.

Quote:

it only allows NTFS in disk management and Linux is FAT right?
Can this be changed in the backtrack install once its made NTFS in Vista?
Linux is EXT3 (most commonly). You can let the Linux installer set up the new partition(s)

john7343 03-12-2007 08:39 AM

Ive made one new partition in Vista so now I have 2.

I go into the Linux Backtrack installer and when I try to make partitions and perform other operations I get told there are no free sectors available and that the new drive is FAT16.

Any ideas please.

john7343 03-12-2007 08:50 AM

Solved the last problem - changed it to type 0 (empty).

Suppose I want to make the first partition of 3 (boot, swap and main partition), 50mb (boot) then if it says this:

First cylinder (13344-19457, default 13344):

What should I use for this.

Next I have:

Last cylinder or +size or +sizeM or +sizeK (13344-19457, default 13344):

+50M?

Cheers

blackhole54 03-12-2007 01:38 PM

Yes. +50M would give a partition of (aprox) size 50 MB.

It sounds like you (or your installer) is using fdisk. That is a perfectly serviceable program, but if you would like something graphical (and less terse/more friendly) you could set your partitions up prior to your install from a live CD that had something like GParted or QTParted on it. KNOPPIX has QTParted (although I had some kind of a problem with it a few weeks ago -- I don't remember the details), and you can download a live CD for GParted (google on gparted). The choice is yours. :)

john7343 03-12-2007 04:57 PM

Okay im using QTparted from the install CD i.e. boot up with CD in and run the OS off the CD and then go into QTParted.

If only I knew how to use it though.

In Vista I make an extra partition to do stuff with in QTParted.

I looked at a tutorial off of the backtrack2 site and the first stage of qtparted looked like this:

number |partition |type|status|size|used space|start|end|
1 /dev/hda1 etc etc
2 /dev/hda-1 etc etc

If I can get to this stage I can do it.

What does the hda-1 mean - an extended partition?

Cheers

john7343 03-12-2007 05:18 PM

Forget my last post Ive solved that now.

The problem is that once I try to create the last partition I get this error:

Must delete some partition and add an extended partition first.

Ive got a compaq diagnostics partition that is getting in the way - if i got rid of this it would work - should I remove thsi i.e. is it safe?

Any ideas?

Cheers

john7343 03-12-2007 07:19 PM

When changing size of ntfs windows partition to make free space for the backtrack partition it changes the windows partition to fat32 after committing, why is this?

Im using QTParted in backtrack2 to do this.

blackhole54 03-12-2007 10:32 PM

Quote:

Originally Posted by john7343
Must delete some partition and add an extended partition first.

Disks on x86 systems have a (primary) partition table on the MBR that allow for up to 4 partitions. This is a hard number -- no way around it. The solution is to use an "extended partition". This extended partition is just an envelope for "logical partitions", which will have the real content. TMK there is no theoretical limit to how many logical partitions the extended partition may have. I believe Linux will only allow one extended partition per disk. In any event, it is a good idea to limit yourself to this. Linux numbers the primary partitions 1 through 4 (e.g. /dev/hda3) and the logical partitions 5 and beyond. This is true even if you are not using all of the primary partitions.

The extended partition itself takes up an entry in the primary partition table. Typically you will create 1 to 3 primary partitions with real content, and then add the extended partition to take up the rest of the disk. You can then add logical partitions to the extended partition at will. Note that once you add the extended partition, resizing and moving the other primary partitions can be quite difficult or impossible.

Quote:

Ive got a compaq diagnostics partition that is getting in the way - if i got rid of this it would work - should I remove thsi i.e. is it safe?
My (limited) experience with Compaq diagnostic partitions is that they are small and usually the first partition on the disk. And they are necessary for BIOS access using F10 (or whatever) at boot time. Unless it is the fourth primary partition, I would recomend you not remove it.

Quote:

When changing size of ntfs windows partition to make free space for the backtrack partition it changes the windows partition to fat32 after committing, why is this?
Sounds like a bug to me. But I have never resized an NTFS partition. You can try googling to see what other people's experience is. Do you know if it actually the filesystem, or if it just changed the id number (such as 0x0b for FAT32) in the partition table? If it was just the last, you can easily change it back with fdisk. (Sounds like I am sending you around in circles, doesn't it? Sorry about that.)

EDIT: WRT NTFS being changed to FAT32, before you do anything rash, you might simply reboot first and make sure it really did change the partition. and didn't just get confused when it displayed the results. If, as I sugested, you want to find out what the real type of the filesystem is (not just id # in partition table), you can try mounting the partition from a live CD and using the mount command w/o parameters to see what Linux says it is. Just to be ultra-cautious, I would mount it read only (use "-o ro" with mount command).

john7343 03-13-2007 04:57 PM

Okay actually got over this problem now.

I need to install grub package to the boot partition in any way possible.

I have put it on USB and tried to install it that way, although i dont know the command. Any ideas what it might be?

Also tried wget although cannot get a connection to the internet even though its detected the wireless/lan card.

Cheers

blackhole54 03-13-2007 10:37 PM

As chance would have it, I stumbled onto an article about Backtrack last night. Now I finally know what you are talking about! :) I also downloaded this PDF which discusses installing Backtrack to a HD. Is this the file that you have been following? If so, it appears to have the ability to install a bootloader to your MBR. I would think this would be easier than trying to do GRUB yourself. You can certainly use GRUB, but I may not be the best person to advise you how to do it from scratch. (I have used GRUB, but I am certainly no authority.)

I suspect, but am not sure that the Backtrack installer uses LILO instead of GRUB. That is not a problem if it leaves a copy of the /etc/lilo.conf it uses on the installed version. I hope it does, but can't be certain.


All times are GMT -5. The time now is 04:21 AM.