On Thu, 2007-07-19 at 17:58 +0000, James wrote:
> Albert Hopkins <marduk <at> gentoo.org> writes:

[...]
> 
> I'm not sure if Vista versus XP make any difference. In a recent post
> on this list about grub  one reader  posted about the fact that with
> Vista the boot.ini file is gone. I'm not sure that this effects your
> proposed method?
> 
I've no experience with Vista, so I can't say for sure.  But it
shouldn't make any difference since boot.ini is used by the Windows
bootloader and we aren't using that (we're replacing it with GRUB).

> 
> >      2. Back up MBR, parition table, and partitions to DVD, network or
> >         external drive.
> >      3. Use ntfsresize to shrink the XP partition, make sure it still
> >         boots.
> 
> Hmmm, I must have missed something. In step one you said to boot via
> a liveCD or RIP linux. Now in step 3 you say to use ntfsresize. Is it
> available on the liveCD (I never used it during an install)? 
> A few more details on this step would be useful.
> 

Sorry when I said boot via liveCD I wasn't specifically referring to the
Gentoo LiveCD, but "a"/"any" liveCD.  The one I always use is RIPLinux.
It's great for this kind of stuff.. but I actually use it on a USB stick
as opposed to a physical CD.  RIPLinux comes with all kinds of stuff:
ntfs/lvm/raid tools, partimage, [g]parted, qemu, mt, mtools, network
clients, cd/dvd recording software, ndiswrapper, alsa, boot-from-grub,
X11, etc. etc).  Fit's on a 128MB USB stick and loads right into RAM.
It's awesome.  You'll never look at another live cd for
recovery/administration again.  Don't tell anyone I said this, but it's
also great for installing Gentoo ;-)

> >      4. Use the space left over from ntfsresize to create
> >         partition(s)/install Gentoo.
> 
> OK, at this point I'm still using the liveCD or does RIP linux
> have tools for access into fdisk or such? (No experience with RIPLinux)

Yes.  Again, RIPLinux has *everything*

I'll be more specific what I did (paraphrased for simplicity.  Again,
I've never done this with Vista.. There may be differences.  Might wanna
check with a Vista user.

When I got my laptop, I booted it with RIPLinux.  The laptop drive
looked like this

+------+
| MBR  |
+------+-------------------------+
| sda1 | Dell Utility Partition  |
+------+-------------------------+
| sda2 | Windows XP              |
+------+-------------------------+
| sda3 | Rescue Partition        |
+------+------------------------ +

First thing I did is copy the partition table.  sfdisk is a good one for
this.  I had an external USB hard drive that I connected to the laptop
and mounted.  I copied the partition table to it.

# sfdisk -d /dev/sda > /mnt/usbdrive/Inspiron_1505_factory.sfdisk

Next I made a copy of the MBR:

# dd if=/dev/sda of=/mnt/usbdrive/Inspiron_1505_factory.mbr \
  bs=446 count=1

I also backed up the Utility and Rescue partitions.  I don't think I
backed up the Windows one, but you could.  Use dd and either copy to an
external drive or dvdrecord (may want to pipe it through bzip2).

# dd if=/dev/sda1 |bzip2 \
  > /mnt/usbdrive/Inspiron_1505_factory_Dell_Utility.sda1.bz2

# dd if=/dev/sda3 |bzip2 \
  > /mnt/usbdrive/Inspiron_1505_factory_Rescue.sda3.bz2

...Utility.sda1.bz2 turned out to be ~2.8GB and ...Rescure.sda2.bz2 is
about 3.4 GB. So they could easily fit on a single-layer DVD+/-R.

Use ntfsresize on the /dev/sda2.  You will need to mount it (ro) first
to see how much space it's actually *using* first.  You could also
optionally get rid of the Rescue partition since you have a copy that
can be restored if need be.

# ntfsresize -s 20G /dev/sda2

After this you'll need to fdisk the drive.  Basically remove sda2 and
add it again with a smaller size *or* use gparted (included with
RIPLinux) and have it do all that for you much easier.  I also replaced
sda1 with an ext2 filesystem and use it for /boot. Use the remaining
space from sda2 and sda3 to to create a Gentoo partition.  So in the end
you'll have something like this:

+------+
| MBR  |
+------+-------------------------+
| sda1 | /boot                   |
+------+-------------------------+
| sda2 | Windows XP (smaller)    |
+------+-------------------------+
| sda3 | Gentoo / (larger)       |
+------+------------------------ +

Or you could create an sda4 for swap (I actually use a swap file on /).
Might wanna reboot after the changes to make sure Windows still comes
up.  Then back into RIPLinux to install Gentoo.  Final step is to
install grub on the MBR and add a root=/dev/sda3 entry for Gentoo and
chainload /dev/sda2 for Windows to boot.

Then if I ever want to restore to factory, (hopefully) all I need to to
is boot with RIPLinux, restore the partition table, restore the MBR,
restore the Utility and Rescue partitions, and then reboot the machine
into Dell's Utility partition and use it to restore the Windows
partition back to factory.  In reality I haven't actually tried that
LOL.  But I do have a working system that dual boots Gentoo and XP.

HTH
--
Albert W. Hopkins

-- 
[EMAIL PROTECTED] mailing list

Reply via email to