how to read content from an old freebsd HD? reddit / freebsd ---------------------------------------------------------------------- tfcheng12 · 2023-06-01 11:44 Hi, need some help here. I have several old (from 2009) freebsd SATA HD and I want to know what's in it. I bought a ADA-USB connector kit and hook it up to a PC booted with Ubuntu from an USB stick. The Ubuntu can see there is a USB disk but can't mount any of the partition, e.g., Error mounting /dev/sdc1 at /media/ubuntu/xxxxx. Wrong fs type, etc, etc. I then used this freebsd HD to directly boot but no matter which option I chose, it all ended with "ROOT MOUNT ERROR" and my keyboard won't work. the only time I can use my keyboard is when I boot into "loader prompt" but I don't know what to do to read HD content. I have also tried FuryBSD but it didn't detect this HD through usb. what can I do next? thank you! ---------------------------------------------------------------------- tvcvt · 2023-06-01 12:14 It’s always possible that the disk is toast, but have you considered booting from a FreeBSD installer and examining the disks that way? If you want a GUI, GhostBSD may work. ---------------------------------------------------------------------- EstablishmentBig7956 · 2023-06-01 12:38 linux can mount ufs using the correct commands, read only I think, and like that other said that hdd could be toast. you can run smart and the other apps on it to tell you that part of it. look up mount commands for linux to mount ufs if that is what it is, get FreeBSD and just boot to shell then do what you're doing in ubunututu with the actual system that is made to read and write to there own format ---------------------------------------------------------------------- odhiambo0 · 2023-06-01 12:40 Download [https://download.freebsd.org/ftp/releases/ISO- IMAGES/13.2/FreeBSD-13.2-RELEASE- amd64-memstick.img](https://download.freebsd.org/ftp/releases/ISO- IMAGES/13.2/FreeBSD-13.2-RELEASE-amd64-memstick.img) and write it to the USB. Boot from it. You will see your external device showing in dmesg, like da0 (or whatever) and you can mount the partitions - da0s2, etc with mount /dev/da0sX /mnt Then look inside /mnt ---------------------------------------------------------------------- [deleted] · 2023-06-01 12:41 [deleted] ---------------------------------------------------------------------- gumnos · 2023-06-01 12:43 The very first thing I'd do is image it off with `dd` to someplace safe so you're not actually operating on the physical media. If your system is currently running FreeBSD, use `dmesg` to determine the device the drive appears as such as `ada1` and then image that: tfcheng@freebsdbox$ DEV=/dev/ada1 # set this according to whatever `dmesg` reports when inserting the USB tfcheng@freebsdbox$ sudo dd if=$DEV of=/home/tfcheng/salvagehdd.img bs=1M If your main system now runs Ubuntu or some other flavor of Linux, you can still image it with a similar command tfcheng@linuxbox$ DEV=/dev/sdc1 # set this according to whatever `dmesg` reports when inserting the USB tfcheng@linuxbox$ sudo dd if=$DEV of=/home/tfcheng/salvagehdd.img bs=1M Once you've safely got that image, disconnect the physical drive and put it some place safe. To read that image, you'll likely need to be running FreeBSD, whether in a VM or on real hardware. If running FreeBSD on physical hardware and you extracted the disk- image to a Linux side of things, you'd have to make it available—whether by putting it on a USB drive or network storage or whatever. Once in FreeBSD with the salvage-image available, you can use [`mdconfig`](https://man.freebsd.org/cgi/man.cgi?mdconfig) to create a loopback device that you should then be able to mount and explore. If running as a VM, you can create a virtual disk, install FreeBSD to there, fire up the virtual system with the `salvagehdd.img` file as an additional drive option. Something like $ truncate -s 20G freebsd.img $ vmmprog --hdd1=freebsd.img --cd=freebsd13.iso (install FreeBSD and shutdown the VM) $ vmmprog --hdd1=freebsd.img --hdd2=salvagehdd.img From there, booting into the VM should show that 2nd image as a hard- drive that you can then mount and explore. *edit: prompt consistency* ---------------------------------------------------------------------- EstablishmentBig7956 · 2023-06-01 12:48 so what then would be the next move? get an OS that "actual system that is made to read and write to there own format" ---------------------------------------------------------------------- [deleted] · 2023-06-01 12:52 [deleted] ---------------------------------------------------------------------- Ami00 · 2023-06-01 16:36 Install freebsd of the needed version into virtual machine, connect drive to it. Grab data from it ---------------------------------------------------------------------- mirandavanbreukeling · 2023-06-01 16:38 For rw-support set experimental kernel flags under filesystems in ‘make xconfig’ but FBSD doesn’t’ like iit within UFS it gives you possibly a bad superblock starting userspace. Is it ZFS or UFS1? ---------------------------------------------------------------------- mqudsi · 2023-06-01 19:06 Use an up-to-date FreeBSD install (or live cd) to mount the disk from the cli with `mount -o ro`. No need to image it with `dd` first as a read-only mount is non-destructive. A modern FreeBSD install can mount a partition created w/ FreeBSD circa 2009 without a problem. ---------------------------------------------------------------------- tfcheng12 · 2023-06-01 19:14 thank you for all your responses. I tried GhostBSD from a live USB stick to boot my PC then mount the HD by: mount /dev/da1s1a /mnt. I can actually read the two HD I have and from the COPYRIGHT file, the system was installed in 2006 and 2009. And there is nothing special in there besides the basic file structure. Well, at least I know what is in it. ---------------------------------------------------------------------- paprok · 2023-06-02 08:46 try with [NomadBSD](https://nomadbsd.org/) - it's based on Free and has automount feature. > PC booted with Ubuntu from an USB stick afaik Linux has shitload of options for *mount_ufs* in regard to what flavor of UFS you wanna read, and you have to specify which one you're using: > ufstype=type_of_ufs > > UFS is a file system widely used in different operating systems. The problem are differences among implementations. Features of some implementations are undocumented, so its hard to recognize type of ufs automatically. That's why user must specify type of ufs manually by mount option ufstype. Possible values are: > > - old - old format of ufs default value, supported as read-only > > - 44bsd - used in FreeBSD, NetBSD, OpenBSD supported as read-write > > - ufs2 - used in FreeBSD 5.x supported as read-write > > - 5xbsd - synonym for ufs2 > > - sun - used in SunOS (Solaris) supported as read-write > > - sunx86 - used in SunOS for Intel (Solarisx86) supported as read- write > > - hp - used in HP-UX supported as read-only > > - nextstep - used in NextStep supported as read-only > > - nextstep-cd - used for NextStep CDROMs (block_size == 2048) supported as read-only > > - openstep - used in OpenStep supported as read-only > and i'm skeptical about putting Free/Open/Net under one umbrella - recently did a crosscheck how different flavors of BSD read their counterparts' varieties of UFS filesystem and it's not that straighforward. *iirc* only Net was able to read Free-created filesystem, other combinations gave trouble. ---------------------------------------------------------------------- rodrigo975 · 2023-06-02 11:37 In case `dd` wasn't good enough to recover your datas, try `ddrescue` from ports. `ddrescue` does the same thing `dd` does but he is able to bypass damaged sectors. my two cents ---------------------------------------------------------------------- tfcheng12 · 2023-06-02 12:32 I wonder if this is too much to ask, but I would like to know which of these BSD on a stick has video/image player/viewer that comes with it? thank you very much! ---------------------------------------------------------------------- grahamperrin · 2023-06-02 23:48 Speeding through the opening post, > … SATA … ADA-USB … used this freebsd HD to directly boot but no matter which option I chose, it all ended with "ROOT MOUNT ERROR" … IIRC that type of thing can happen if you have multiple FreeBSD boot drives. Try physically disconnecting other drives before attempting boot. ---------------------------------------------------------------------- grahamperrin · 2023-06-02 23:50 > write it to the USB. For clarity: not to the SATA disk that's on USB. ---------------------------------------------------------------------- grahamperrin · 2023-06-02 23:57 > nothing special in there besides the basic file structure. UFS, yes? > Well, at least I know what is in it. ---------------------------------------------------------------------- grahamperrin · 2023-06-02 23:59 > which of these BSD on a stick has video/image player/viewer Did GhostBSD in live mode *not* have a player/viewer? ---------------------------------------------------------------------- tfcheng12 · 2023-06-03 11:39 I can't fine anything I can use under GhostBSD and FuryBSD, but I did find the apps I need under NomadBSD, and it also give my wifi and sound. NomadBSD is the KING! :\_)