How can I access HDD to save files before fresh install of FreeBSD...

In a previous post I asked about error "getty repeating too quickly on port /dev/ttyv0, sleeping 30 sec" after upgrading from FreeBSD 11.1 RELEASE to FreeBSD 11.2 RELEASE. Not just ttyv0 but also ttyv0-8. Didn't get much response on a fix so I decided to upgrade to FreeBSD 12.0 RELEASE. Now says I'm missing file libcrypto.so.8 and now I cannot start x or enter commands before getting the error "getty repeating too quickly" again.

I've now boot with liveCD but how do I access HDD to save files I want to keep before doing a fresh install of FreeBSD 12.0 RELEASE? When I try /dev/ada0 I get Permission Denied.
 
You need to mount the partition or slice.
It depends on if it was MBR or GPT type partition:
mount /dev/ada0p2 /mnt << For GPT
mount /dev/ada0s1a /mnt << For MBR
This is assuming a single disk computer with only FreeBSD installed.

You probably want a second usb drive to copy the files to. That is a good practice when just starting out.
Keep all your configs on a thumbdrive for backup.
So boot up off USB Memstick in LiveCD mode and then insert second USB stick. The details about it will show up on screen.
Then mount it at a second location(ie. /media) and copy your files over. When done issue a dismount for both:
umount /media umount /mnt

In a pinch I suppose you could copy the files to your memstick installer, but it is not ideal.
You would have to remount the LiveCD media RW. By default it is RO.
mount -o rw /
 
Last edited:
My preferred method of rescuing files is booting up off a USB Thumbstick that I install FreeBSD onto.
So I have portable FreeBSD install. I do Xorg and the whole shebang. I use a name brand USB3 64GB stick.
Disk time is bad at 25MB/s but that only matters when upgrading.
I took mine from 11.2 to 12 and it took quite a while. Then reinstalling all the packages too quite a while too.
But its overall utility has surpassed my expectations. I have a portable Office and Browser.
It makes an excellent rescue device.
 
The missing libcrypto will just be because you haven't reinstalled all of your packages/ports as you are required to do as part of the upgrade. Do that and the error should go away.
 
The missing libcrypto will just be because you haven't reinstalled all of your packages/ports as you are required to do as part of the upgrade. Do that and the error should go away.
Ideally I would like to do this but the "getty repeating too quickly" error only gives me about 30 seconds before logging me out. Is there a way to stop "getty repeating too quickly" error so I can reinstall ports and possibly startx? If not it seems I will have to reinstall OS fresh as per Phishfry's suggestions.
 
Quite honestly I have no idea what would be causing that. I'm guessing something in /etc/ttys might be incorrect maybe, or there is an X login manager like gdm or slim which is configured to start up on boot which is failing because the packages haven't been reinstalled. I would maybe look at booting it in single user mode to double check the ttys file for any errors, and to disable any login managers from automatically starting up.

One thing that might be worth trying is switching to a different virtual console as well with control-alt-F2. Console logs quite often only appear on the first console.
 
Try running in single-user mode. That might bypass all the getty problems. Perhaps for long enough to get the system actually repaired.

Also listen to Phishfry's advice: you seem to be unclear on the difference between a disk drive /dev/adaXX and the file system on it. And if you get "permission denied", you are probably not root, so learn the difference between user accounts and root. And if you already know all that, apologies for mistakenly insulting you.
 
You can also use nano to make these changes.
I don't know why I said you must use a FreeBSD editor to change this. Any editor will do.
 
Quite honestly I have no idea what would be causing that. I'm guessing something in /etc/ttys might be incorrect maybe, or there is an X login manager like gdm or slim which is configured to start up on boot which is failing because the packages haven't been reinstalled. I would maybe look at booting it in single user mode to double check the ttys file for any errors, and to disable any login managers from automatically starting up.

One thing that might be worth trying is switching to a different virtual console as well with control-alt-F2. Console logs quite often only appear on the first console.
Boot in single user mode gives same "getty repeating too quickly" error. CTRL-ALT-F2 allows me to login again but then get the same "getty repeating too quickly" error.
 
Try running in single-user mode. That might bypass all the getty problems. Perhaps for long enough to get the system actually repaired.

Also listen to Phishfry's advice: you seem to be unclear on the difference between a disk drive /dev/adaXX and the file system on it. And if you get "permission denied", you are probably not root, so learn the difference between user accounts and root. And if you already know all that, apologies for mistakenly insulting you.
Yes I'm very unclear on a lot of FreeBSD knowledge but have no desire to quit using it. I certainly am not insulted by the truth ;)

When I boot from liveCD as user root with no password is that not root as you described?
 
You can also use nano to make these changes.
I don't know why I said you must use a FreeBSD editor to change this. Any editor will do.
I installed FreeBSD 11.1 RELEASE as per Trihexagonal tutorial, which uses EE and found that easier to learn than vi. I never used nano yet but at this point I can't stay logged in long enough to do anything. I can load liveCD but don't know where to go from there to recover config and data files as I'm stuck at root@:~ # and for clarity I can't load liveCD with USB on this HP laptop for some reason even after trying many options in boot options. I have to use liveCD burned onto DVD. Any advise how access HDD to recover files?
 
Boot in single user mode gives same "getty repeating too quickly" error.
That is strange. The problem in your FreeBSD installation must be serious, although it might be simple for an expert to repair. I like your idea of saving important files, then re-installing.

Yes I'm very unclear on a lot of FreeBSD knowledge but have no desire to quit using it.
Good. I like the fact that you are using RELEASE versions, those are more solid and stable. First starting point: Do not try to do normal work as root. Matter-of-fact, try to never even login as root, except from the console for installation and other serious administration work that requires doing lots of stuff as root. Second: Try to not mess with the installation any more than necessary. Install a stable version, and then don't mess with it. Old joke: The best way to administer a computer is to hire a man and a dog. The man is there to feed the dog. The dog is there to bite the man if the tries to touch the computer.

When I boot from liveCD as user root with no password is that not root as you described?
It is. When booting from live CD, you should be able to mount the file system, as was described above, and copy the data to for example a USB stick (which you also have to mount, and perhaps format).

... which uses EE and found that easier to learn than vi.
You should try different editors, to learn what you prefer. Ee an nano are quite simple. Emacs and vi are quite powerful, but complex.

I have to use liveCD burned onto DVD. Any advise how access HDD to recover files?
Nutshell: Boot from live CD. Now you have a running system on the hardware. Find the hard disk that your file system was on (probably /dev/adaXXX). Mount it on a temporary mount point, for example /mnt/temp, preferable with the readonly or "ro" option. Now you can look in the mount point, and find your files. Find an empty USB stick, and insert it. If it doesn't have a file system yet, or you don't like the file system on it, format it with a file system of your choice (personally, I just use FAT on USB sticks, good enough for short-lived stuff). Copy the desired files from the mounted disk to the USB stick. Make 200% sure the data you want really is on the USB stick. Perhaps insert it in a different computer, and quickly read it. Unmount all, shut down, and reinstall the FreeBSD OS.
 
My big rant about nano comes down to this. ee is built-in and nano is a port and requires downloading.
So learn to use base tools and then experiment if you need more.
I was fixated on nano in the beginning and wish somebody had shoved me to use ee.

Now let me guess why you need default editor to be changed:
Is it for mc or ytree usage? That is the only reason I change it.
misc/ytree's shell uses my .cshrc settings.
 
Nutshell: Boot from live CD. Now you have a running system on the hardware. Find the hard disk that your file system was on (probably /dev/adaXXX). Mount it on a temporary mount point, for example /mnt/temp, preferable with the readonly or "ro" option. Now you can look in the mount point, and find your files. Find an empty USB stick, and insert it. If it doesn't have a file system yet, or you don't like the file system on it, format it with a file system of your choice (personally, I just use FAT on USB sticks, good enough for short-lived stuff). Copy the desired files from the mounted disk to the USB stick. Make 200% sure the data you want really is on the USB stick. Perhaps insert it in a different computer, and quickly read it. Unmount all, shut down, and reinstall the FreeBSD OS.
OK I think I'm on the right track after trying to do things like DOS commands...ugh!

I did the following hoping it is read only and now I can see my HDD files/folders...
Code:
mount -o ro /dev/ada0p2 /mnt

Could you show me where config files are located for the following...
Fluxbox DM
Thunderbird
Gkrellm2
Pale Moon web browser, Bookmarks and about:config
Xfe

Is there anything I'm missing that should be saved other than files I added such as pics, vids, music, documents etc that would help streamline a new installation?

Thank you both ralphbsz and Phishfry for getting me this far!
 
Well I can start you off with the Pale Moon if it is like most mozilla's. You need to find your default profile.
It will have a cryptic file name. This might find it:
find / -name ".mozilla"
Then drill down for example:
ls /home/user/.mozilla/
extensions palemoon
Now drill down more:
ls /home/user/.mozilla/palemoon
4r51b09e.default profiles.ini
Now this cryptic number is your profiles directory.

Anyway you need /bookmarkbackups/ but the problem is they are compressed. Major pain.
I save mine in a json file backup in a seperate directory. Lost my whole profile more than once.
With Thunderbird installed this all might get very messy.

You really need to backup xfe settings?? How many are there?

Now might be a good time to keep a log of what files are important to you.
We can't possibly help you with everything.

Remember that portable FreeBSD Installed on a USB thumbdrive I was babbling about?
The GUI I have installed on that makes all this type recovery work easier.
Consider that.
A minimal Xorg and xfe setup would go pretty quickly.
 
Phishfry

I was in hopes all these config files would be stored in a particular folder somewhere like etc for example and I could save that particular folder with everything on it then poke away at it after reinstall of FreeBSD 12 RELEASE.

You're right, xfe only has background color changed so ya, appologies for even throwing that out there.

Definitely will setup a USB thumbdrive with FreeBSD and Xorg.

Thanks again for the help!
 
Could you show me where config files are located for the following...
Fluxbox DM
Thunderbird
Gkrellm2
Pale Moon web browser, Bookmarks and about:config
Xfe

I use all those programs except mail/thunderbird and the only thing I save is my /etc directory to work from when editing files on my new system.

Well, I do use x11-wm/fluxbox as a WM instead of Fluxbox DM but you get the idea. ;)

sysutils/gkrellm2, www/palemoon and x11-wm/fluxbox config files are in hidden directories in your /home/user directory. Palemoon under /home/user/.moonchild productions. Yes, there is a space there.
 
Sorry, can't help at all with that. I don't use either *BSD or Linux as a desktop environment, purely as a server.
But you did great with a novice on the FreeBSD CLI. The toughest part for me (coming from DOS eons ago) was once I mounted the HDD and used
Code:
ls
I got the same directory from the liveCD I was in. For some reason I tried
Code:
cd mnt
with no joy. Then I tried
Code:
cd /mnt
and then
Code:
ls
and it all came together. A rough tumble of frustration but I took my beating and now off to the next ;)

I use all those programs except mail/thunderbird and the only thing I save is my /etc directory to work from when editing files on my new system.

Well, I do use x11-wm/fluxbox as a WM instead of Fluxbox DM but you get the idea. ;)

sysutils/gkrellm2, www/palemoon and x11-wm/fluxbox config files are in hidden directories in your /home/user directory. Palemoon under /home/user/.moonchild productions. Yes, there is a space there.
I originally got my system up and running through your tutorial here. It's been a great resource-friendly system on my old laptop! A few challenges for a noob as I could not get this HP Probook to boot liveCD with thumbdrive but worked with ISO burned to DVD but has to be same version as installed on HDD for some odd reason.

Thanks for the extra tips on files to save. I'll do that and what Phishfry recommended to cover as many bases as possible. And yes...WM not DM!
 
Trihexagonal have some desktop tutorials in his SITE (except you probably want to stick with pkg instead of portsmaster).
I actually thought Trihexagonal did great explaining ports in his tutorial so I stuck with that without mixing ports and pkg. While it does take a long time to install some ports, it keeps me somewhat familiar with CLI. I don't mind since I have another box to use when installing large ports or self-destruct my system...like now.
 
I actually thought Trihexagonal did great explaining ports in his tutorial so I stuck with that without mixing ports and pkg. While it does take a long time to install some ports, it keeps me somewhat familiar with CLI. I don't mind since I have another box to use when installing large ports or self-destruct my system...like now.

So, I would use ports-mgmt/synth instead of ports-mgmt/portmaster instead. SYNTH will save you of a lot of trouble. ;)
 
As mentioned in other posts I have been using net-p2p/rslsync with great success. I have three FreeBSD home servers, but two are off-site. I use Resilio to sync my files across three machines. If my house burns down I still have two copies elsewhere. When I built my new home server (AMD Ryzen 5 1600) I simply added my new drives, re-added the sync shares, and mowed the grass while I waited. The old home server was online so that made the data transfer to the new machine very fast. I'm very pleased with this. I'm using UFS, yeah I might get a corrupt file once in a while but none of my data I can take to heaven .

To overcome file corruption, prevent against accidental deletion, etc I still do manual backups using tar to a portable network storage drive.
 
Back
Top