mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andries.Brouwer@cwi.nl
To: aebr@win.tue.nl, konsti@ludenkalle.de
Cc: linux-kernel@vger.kernel.org, torvalds@osdl.org
Subject: Re: Weird partititon recocnising problem in 2.6.0-testX
Date: Mon, 10 Nov 2003 17:02:36 +0100 (MET)	[thread overview]
Message-ID: <UTC200311101602.hAAG2an12276.aeb@smtp.cwi.nl> (raw)

>> 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

             reply	other threads:[~2003-11-10 16:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-10 16:02 Andries.Brouwer [this message]
2003-11-14  8:18 ` Rogier Wolff
  -- strict thread matches above, loose matches on Subject: below --
2003-11-10 10:24 Konstantin Kletschke
2003-11-10 10:56 ` Andries Brouwer
2003-11-10 11:32   ` Konstantin Kletschke
2003-11-10 11:57   ` Konstantin Kletschke
2003-11-09  1:12 Konstantin Kletschke
2003-11-09  2:36 ` Andries Brouwer
2003-11-09  3:49   ` Konstantin Kletschke
2003-11-09 11:58     ` Andries Brouwer
2003-11-09 12:10       ` Stefan Smietanowski
2003-11-09 22:15         ` Konstantin Kletschke
2003-11-09 23:09           ` Konstantin Kletschke
2003-11-10  0:00             ` Andries Brouwer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=UTC200311101602.hAAG2an12276.aeb@smtp.cwi.nl \
    --to=andries.brouwer@cwi.nl \
    --cc=aebr@win.tue.nl \
    --cc=konsti@ludenkalle.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®