Subject: Re: restorecd, fdisk problems on cobalt
To: None <eau@phear.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-cobalt
Date: 12/30/2007 13:39:34
eau@phear.org wrote:
> Well for now the cd boot i've changed install.sh to do ${SH} -i
> in order to have a shell prompt, so they are executing correctly
> at boot.. if I made errors, I will be able to correct easily.
Diff of install-core.sh might help.
> # dd if=/dev/zero of=/dev/rwd0d count=1
> 1+0 records in
> 1+0 records out
> 512 bytes transferred in 0.003 secs (170666 bytes/sec)
> # fdisk -S /dev/wd0
> [1] Trace/BPT trap fdisk -S /dev/wd0
> #
>
> Still not good, MBR cleaned, but still crashing..
>
> what else could it be?
Hmm, You could try
- fdisk wd0 (not /dev/wd0)
- fdisk -S wd0 (not /dev/wd0)
- fdisk -S -b 1024/255/63 wd0
- fdisk -0 -u -f -b 1024/255/63 -s 0/0/0 wd0
- fdisk -v -0 -u -f -b 1024/255/63 -s 0/0/0 wd0
etc?
(fdisk(8) man page description for -b, -f and -u seems inconsistent..)
> >
> > fdisk(8) seems problematic on non-x86 ports (which don't have BIOS values),
> > but I have not tracked what triggers it.
>
> I try to look at fdisk srcs ... any starting point is welcome anyway.
I guess the problem is in intuit_translated_geometry()
and get_mapping() in src/sbin/fdisk/fdisk.c.
Maybe we should add some sanity checks if each parameter
read from disk isn't zero, but sprinkling printf()s there
might help to track the problem.
---
Izumi Tsutsui