On Wed, Feb 10, 2021 at 07:11:53PM +0000, Ed Gray wrote:

> Hi Otto,
> 
> Thanks for your reply. This is what I see on a shell from bad.rd when I try
> to access the first SATA HDD.
> 
> # disklabel sd0
> disklabel: /dev/rsd0: no such file or directory
> 
> # disklabel sd0c
>  disklabel: /dev/rsd0c: no such file or directory
> 
> Same for rsd0 and rsd0c.
> 
> The device nodes don't exist until the install or upgrade program detects
> the disk and creates them.
> 
> Likewise for wd0 as although outdated for ahci disks.
> 
> Dmesg identifies the disk as:
> sd0 at scsibus0 targ0 lun0 ATA ST1000DM003...
> sd0 953869mb ....
> 
> This is why I had to run the install program and accidentally went too far.

A cd /dev; ./MAKEDEV sd0 would have been enough to continue. 

        -Otto


> 
> It would be helpful to be able to use disklabel and other tools such as
> newfs, growfs without running through the installer.
> 
> In my case I forgot that the installer continues automatically with the
> next command and also used the wrong switch to disklabel.
> 
> It's a good thing I take backups seriously nowadays.
> 
> Regards
> Ed Gray
> 
> On Wed, 10 Feb 2021, 3:52 pm Otto Moerbeek, <[email protected]> wrote:
> 
> > On Wed, Feb 10, 2021 at 03:35:06PM +0000, Ed Gray wrote:
> >
> > > Okay, thanks Stuart.
> > >
> > > I have left testdisk running a deep scan and will see if it finds my
> > /var.
> > > I know I'll still have to mount the partitions and I don't know if an
> > fsck
> > > would be able to fix any damage done by newfs.
> > >
> > > I think at this point I'm better off starting again as like others I've
> > > done many upgrades. It's probably not worth trying to fix for the sake of
> > > getting a few configuration files and settings back and maybe some files
> > I
> > > have elsewhere.
> > >
> > > I would be interested in finding out a way to access my SATA HDD (sd0)
> > with
> > > disklabel and other tools on the ramdisk without first running the
> > install
> > > or upgrade programs.
> >
> > If you starft a shell on the initial prompt of a bsd.rd boot you get a
> > shell and a fine selection of commands that are useful for recovery.
> >
> >         -Otto
> >
> > >
> > > Regards
> > > Ed Gray
> > >
> > > On Wed, 10 Feb 2021, 8:33 am Stuart Henderson, <[email protected]>
> > wrote:
> > >
> > > > On 2021-02-09, Ed Gray <[email protected]> wrote:
> > > > > I have backups and will probably not have lost anything important
> > but I
> > > > > just wondered if anyone had any suggestions as to whether this is
> > fixable
> > > > > and what steps to take before I give up and re-install? I followed a
> > > > how-to
> > > > > I found which suggested using scan_ffs to rebuild my disklabel but
> > it's
> > > > > finding some of the volumes and not all of them.
> > > >
> > > > If you were able to recover /var, check in /var/backups where you will
> > > > hopefully find some disklabel.* files.
> > > >
> > > > scan_ffs does not support FFS2, previously used only for large
> > > > filesystems but on newer installations now used for all filesystems.
> > > >
> > > >
> > > >
> >

Reply via email to