Re: ATA-100 controller and dual boot xp-linux



Alessandro <ale.mito@xxxxxxxxxx> wrote:
Hi all,

I'm doing some trials to do a dual boot between XP SP3 (already
installed) and Ubuntu on a laptop with the old ATA-100 controller and
a 160 GB hd partitioned as C (windows) and d (data) (so Windows views
until 137 GB)

1) First Scenario: I deallocate 15GB with partition magic from D to
not-partitioned space, install Ubuntu and dual boot works fine. Note:
Linux views hd as 160 GB, so I've used the deallocated 15 GB +
remaining 23 GB hidden to Windows

If I understand correctly, at this point, the partition scheme is:
[0, 122G] -> Windows (C:)
[123G, 160G] -> Linux partition

2) Second Scenario: at this point I would like to recover in some
tricky way the space stolen to D and reinstall insted Linux in the 23
GB hidden to Windows. I had done before First Scenario an image of
hard disk, so I have replaced it, I give again th 15 GB to D, start
Linux install cd using the 23 GB hidden.


And now, the partition scheme is:
[0, 137G] -> Windows (C:)
[137G, 160G] -> Linux partition
Surprise: at startup GRUB Error ... no boot either for Linux or
Windows

Then I have done:

1) recover MBR of Windows ... of course Windows starts good, reinstall
Ubuntu from cd giving it also 10 GB taken from D. But at startup I get
the same GRUB Error. Of course I can't start none of my OS


That's pretty expected. GRUB cannot access the data above 137G because it uses the BIOS int 13h. On this old computer with an old ATA LBA-28 controller, the BIOS won't access data above 137G.
The Linux kernel is able to access data above 137G, but it uses its own drivers. I guess it degrades to PIO mode above 137G when the controller uses LBA-28.

You wouldn't expect the BIOS to be better than Windows XP. :)

The problem isn't specific to GRUB. Any boot loader that I know uses BIOS int 13h, because it's not possible to put an ATA controller driver in 446 bytes.

Maybe MBR recovery has dirtied something if I reinstall Linux after,
so my idea would be to recover - again - the image of my disk and then
resintall Linux using the 15 GB from D:

Hoping it solves ...
That won't solve the problem.
Extending the existing 23GB partition to include a few megabytes of the lower 137GB isn't good, because there's no guarantee that the kernel and initrd files will be allocated in the lower bytes.

The solution is to steal a few megabytes to C: in order to put a /boot partition just below 137GB.
32 to 64 megabytes should be enough to contain a few kernels and large initrds.

The partition scheme would look like:

[0, 137GB - 64MB] -> Windows NTFS /dev/hda1 (size = 137 GB minus 64 megabytes)
[137GB - 64MB, 137GB] -> Linux ext2 /dev/hda2 (size = 64 MB)
[137GB, 160GB] -> Linux /dev/hda3 (size = 23 GB)

If you need a swap partition, I suggest you put it in the first 137GB, because I'm pretty sure performance above 137GB are very poor (You may test it yourself).
Ideally, a swap partition should be stored close to the start of disk, but, if you don't want to move the Windows XP partition, you should put a 2 GB swap partition between 135 GB and 137 GB - 64 megabytes.

The grub files (/boot/grub) should, of course, be stored in the /boot partition, as well as the kernel +/- initrd.
You'll have to reinstall grub to make things work.
Something like (in the grub shell):
root (hd0,1)
setup (hd0)

And edit menu.lst

General advice: Make you sure your data is well backed up before playing too much with ntfsresize & co.

--
André Gillibert
.


Quantcast