lkml.org 
[lkml]   [2003]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: Weird partititon recocnising problem in 2.6.0-testX
>> I suppose that booting with boot parameter "hda=remap" should work.

> Seems so...

Good. So there were two problems. One was devfs+hd.c, caused by
the fact that hd.c fails to set devfs_name. And the second was
EZDrive, solved by booting with "hda=remap".

Probably it is a good idea to warn when we see EZD or DM.
A minimal patch would be

--- 2.6.0test9/linux/fs/partitions/msdos.c Fri May 30 18:12:57 2003
+++ fs/partitions/msdos.c Mon Nov 10 16:20:11 2003
@@ -425,6 +425,10 @@
put_partition(state, slot, start, size);
if (SYS_IND(p) == LINUX_RAID_PARTITION)
state->parts[slot].flags = 1;
+ if (SYS_IND(p) == DM6_PARTITION)
+ printk("[DM]");
+ if (SYS_IND(p) == EZD_PARTITION)
+ printk("[EZD]");
}

printk("\n");
The next project for you is getting rid of EZD (if you want).
Backup valuable stuff.

Boot a kernel that remaps, say vanilla 2.4.
Print partition table (in sector units) on paper.
sfdisk -d /dev/hda > hda.pt
gives the full table in a format that sfdisk can restore.
dd if=/dev/hda of=hdapt bs=1 count=64 skip=446
gives the primary part of the table in binary.
dd if=/dev/hda of=hdambr bs=512 count=1
gives the entire fake sector 0 (that is, sector 1).
Save the output files somewhere not on hda.
Now boot a kernel that does not remap. Since you won't see
your root filesystem on hda, this should probably be from
a rescue floppy or CD. Recent kernels understand the "hda=noremap"
boot parameter. Make sure no remap is done (e.g., *fdisk
mentions partitions of type 55). Now write the desired partition
table (e.g.
dd if=hdapt of=/dev/hda bs=1 count=64 seek=446
or
dd if=hdambr of=/dev/hda
or
sfdisk /dev/hda < hda.pt
).

That should do it, but be careful that you can boot again afterwards.
Sector 0 has the partition table in bytes 446-509,
a signature in bytes 510-511, and a boot loader in bytes 0-445.
You may have to reinstall LILO or grub or so. In some cases
copying the entire sector 1 to sector 0 will suffice.

Good luck!
Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.046 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site