I've seen a few discussions of sysinstall vs disklabels, but this
problem looks a little different.

I sliced up a 37G disk with 4.7-RELEASE on ad0s1, Win2k on ad0s[23]
and ad0s4 empty. I installed grub-0.92, putting the bootloader in
the MBR and config files in ad0s1a. Everything worked fine.

Then I installed 5.0-RC1 on ad0s4. The next reboot, grub dumped me
at the prompt, saying that there were no BSD partitions on ad0s1.

It took a while to figure out the problem, but it seems that
installing 5.0-RC1 on slice 4 rewrote the disklabel on slice 1.

I wiped ad0s4 and reinstalled last night, saving the before and
after disklabels.


Here's ad0s1 (4.7):

  # /dev/ad0s1c:
  type: ESDI
  disk: ad0s1
  label:
  flags:
  bytes/sector: 512
  sectors/track: 63
  tracks/cylinder: 255
  sectors/cylinder: 16065
  cylinders: 1621
  sectors/unit: 26057367
  rpm: 3600
  interleave: 1
  trackskew: 0
  cylinderskew: 0
  headswitch: 0           # milliseconds
  track-to-track seek: 0  # milliseconds
  drivedata: 0

  8 partitions:
  #        size   offset    fstype   [fsize bsize bps/cpg]
    a:  4194304        0    4.2BSD        0     0     0   # (Cyl.    0 - 261*)
    b:  2097152  4194304      swap                        # (Cyl.  261*- 391*)
    c: 26057367        0    unused        0     0         # (Cyl.    0 - 1621*)
    e:  4194304  6291456    4.2BSD        0     0     0   # (Cyl.  391*- 652*)
    f:  4194304 10485760    4.2BSD        0     0     0   # (Cyl.  652*- 913*)
    g: 11377303 14680064    4.2BSD        0     0     0   # (Cyl.  913*- 1621*)

Here's ad0s4 (empty):

  # /dev/ad0s4c:
  type: ESDI
  disk: ad0s4
  label:
  flags:
  bytes/sector: 512
  sectors/track: 63
  tracks/cylinder: 255
  sectors/cylinder: 16065
  cylinders: 1622
  sectors/unit: 26057430
  rpm: 3600
  interleave: 1
  trackskew: 0
  cylinderskew: 0
  headswitch: 0           # milliseconds
  track-to-track seek: 0  # milliseconds
  drivedata: 0

  8 partitions:
  #        size   offset    fstype   [fsize bsize bps/cpg]
    c: 26057430        0    unused        0     0         # (Cyl.    0 - 1621)

And here's the config for sysinstall:

  # disk format
  disk=ad0
  partition=existing
  bootManager=none
  diskPartitionEditor

  # disk slices
  ad0s4-1=ufs     4194304     /           1       # 2G    + soft updates
  ad0s4-2=swap    2097152     none                # 1G
  ad0s4-3=ufs     4194304     /var        1       # 2G    + soft updates
  ad0s4-4=ufs     4194304     /usr        1       # 2G    + soft updates
  ad0s4-5=ufs     0           /home       1       # free  + soft updates
  diskLabelEditor

  # install system
  distSetEverything
  mediaSetCDROM
  installCommit

  # install packages
  package=lynx-2.8.4.1c
  packageAdd
  package=sudo-1.6.6
  packageAdd


After the installation, here's ad0s1 (4.7):

  # /dev/ad0s1c:
  type: ESDI
  disk: ad0s1
  label:
  flags:
  bytes/sector: 512
  sectors/track: 63
  tracks/cylinder: 255
  sectors/cylinder: 16065
  cylinders: 1621
  sectors/unit: 26057367
  rpm: 3600
  interleave: 1
  trackskew: 0
  cylinderskew: 0
  headswitch: 0           # milliseconds
  track-to-track seek: 0  # milliseconds
  drivedata: 0

  8 partitions:
  #        size   offset    fstype   [fsize bsize bps/cpg]
    a:  4194304        0    unused        0     0         # (Cyl.    0 - 261*)
    b:  2097152  4194304    unused        0     0         # (Cyl.  261*- 391*)
    c: 26057367        0    unused        0     0         # (Cyl.    0 - 1621*)
    e:  4194304  6291456    unused        0     0         # (Cyl.  391*- 652*)
    f:  4194304 10485760    unused        0     0         # (Cyl.  652*- 913*)
    g: 11377303 14680064    unused        0     0         # (Cyl.  913*- 1621*)

And ad0s4 (5.0-RC1):

  # /dev/ad0s4c:
  type: ESDI
  disk: ad0s4
  label:
  flags:
  bytes/sector: 512
  sectors/track: 63
  tracks/cylinder: 255
  sectors/cylinder: 16065
  cylinders: 1622
  sectors/unit: 26057430
  rpm: 3600
  interleave: 1
  trackskew: 0
  cylinderskew: 0
  headswitch: 0           # milliseconds
  track-to-track seek: 0  # milliseconds
  drivedata: 0

  8 partitions:
  #        size   offset    fstype   [fsize bsize bps/cpg]
    a:  4194304        0    4.2BSD        0     0     0   # (Cyl.    0 - 261*)
    b:  2097152  4194304      swap                        # (Cyl.  261*- 391*)
    c: 26057430        0    unused        0     0         # (Cyl.    0 - 1621)
    d:  4194304  6291456    4.2BSD        0     0     0   # (Cyl.  391*- 652*)
    e:  4194304 10485760    4.2BSD        0     0     0   # (Cyl.  652*- 913*)
    f: 11377366 14680064    4.2BSD        0     0     0   # (Cyl.  913*- 1621*)


Notice that all the fstype values on ad0s1 have changed to 'unused'
- this borks grub, because it can't find any FFS filesystems.

So I installed boot0 (which didn't have any problem with the missing
fstypes), rebooted into 4.7 and fixed things with disklabel -e.

Once grub could see BSD partitions, I reinstalled it in the MBR and
everything worked fine again.

Should an installation on one slice be changing things on another
slice? Or have I made an enormous blunder here?


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to