Solved fsck issue

Hello,
My system AMD64 quad cores is damaged following a of Gnome halted, I made a reset since I have many hard drive errors, Gnome does not start anymore, I made the startup menu the single user with the Option 6: 1 / acpi on, 2 / safe mode on, 3 / single user on, 4 / verbose on. I have the command / bin / sh :, I have the prompt "#". I made a fsck: it marks me ***** File sytem marked clean *****************.
I reboot still full of hard drive error, what should you boot with a cdrom?

I have important data on this hard disk I would like to have time to make a backup

Regards
Philippe
 
The HD errors are caused by the unclean shutdown, and if you want to run fsck manually you only need to boot in single user mode, no need to check for acpi or safe mode. That said, did you check all of the filesystems that you have?
 
I have to start with AHCI if not the system does not start, when I do a fsck it does not repair, I tried FSCK -f, nothing always makes mistakes! I was in the bios to deactivate AHCI but the system does not start without it!

i do # fsck -c /etc/fstab. still error
 
Can you post the output of fsck?
i not have the output of FSCK because Gnome don't work, and ssh are not avaible.
the system after the prompt befor load Gnome, display errors and reboot automatiquely !

Someone can tell me, if since cdrom can i to do for repair my hard drive because i thinks that the system files are corupt !

how to mount hard drive since the cdrom FreeBSD 10.3
 
Someone can tell me, if since cdrom can i to do for repair my hard drive because i thinks that the system files are corupt !

how to mount hard drive since the cdrom FreeBSD 10.3
You don't. fsck can easily access your harddisks without you mounting them. In fact it's best that you don't in order to prevent any accidental writing.

Use sysctl kern.disks to identify the hard disks or better: use gpart show to check all available slices / file systems. Then simply use fsck accordingly.
 
If you can't boot to single user mode then yes boot the CD and opt for the Shell option to get to the command line from where you can use gpart and fsck ... etc. to fix problems.

I like to install freebsd twice. Once in a main partition/disk, that I add to (gui/desktop etc.), another preferably on another disk/partition that is just the base system plus some additional admin packages. With such a dual boot its easy to boot and fsck the main partition from that 'admin' boot session. I also use that to do backups i.e. boot the admin session and mount the main partition and I use squashfs-tools to create a compressed filesystem image of the main partition (sda3 in my case is where the gui freebsd is located)

cd backups
mkdir /tmp/sda3
mount /dev/ada0s3 /tmp/sda3
mksquashfs /tmp/sda3 sda3-backup.sfs

If I need to restore then similar
cd backups
mkdir /tmp/sda3
mount /dev/ada0s3 /tmp/sda3
unsquashfs -f -d /tmp/sda3 sda3-backup.sfs

You need to have installed squashfs-tools (pkg install squashfs-tools), and of course before restoring using unsquashfs, its perhaps best to have removed all of the original content (rm -rf /tmp/sda3).

Make sure you also copy backups (such as sda3-backup.sfs) to a removable device and preferably store that offsite (perhaps a usb stick stored at another family members home).

mksquashfs will typically produce a file around half the size of what is being stored (by default it uses gzip) and typically take the time it takes to make a cup of coffee/tea to run through. It shows a progression bar as its running which provides a indication of how much longer it will take. I like to make such a backup before applying any updates or other system changes.

That's all for UFS. If you're using ZFS then it can do all of that sort of thing in the background/easier. Personally however I prefer UFS for a single user desktop setup (content to do the above manually myself).
 
If you're using ZFS then it can do all of that sort of thing in the background/easier.
If he was using ZFS there would be no dirty filesystem and no need to fsck(8) since ZFS can auto-heal itself (in most cases at least) ;)
 
hi,
i boot with a cdrom, after the command gpart show i see the hard drive :
1/ ada0 _ gpt
1/ freebsd_boot
2/ freebsd-ufs
3/ freebsd-swap
i do fsck but the command cannot apply
i do mount -t /dev/ada0 >> hard drive mounted
how to do for repair freebsd-ufs ?
i use the shell of cdrom, and i have the prompt '#'.
if i starting the tools of repair like fsck nothing is happening
 
1/ ada0 _ gpt
1/ freebsd_boot
2/ freebsd-ufs
3/ freebsd-swap
i do fsck but the command cannot apply
I'm not sure what you mean with that.

Anyway, the command you're looking for: fsck /dev/ada0p2.

If you get errors such as 'not found' then try specifying a path. For example /sbin/fsck or maybe: /rescue/fsck (this doesn't apply to the cdrom though, but when all else fails...).

i do mount -t /dev/ada0 >> hard drive mounted
how to do for repair freebsd-ufs ?
I sincerely doubt that. First the -t requires a parameter but most of all there's no filesystem on /dev/ada0, so mount wouldn't recognize anything to use. And if that fails then it doesn't perform any mount operations.

You could try # mount /dev/ada0p2 /mnt but before you do that start with the fsck command.
 
yes # mount /dev/ada0p2 /mnt Works fine, but what its options to use fsck / mnt for it to repair CRC-error errors. because after the mount i am only read option
 
yes # mount /dev/ada0p2 /mnt Works fine, but what its options to use fsck / mnt for it to repair CRC-error errors. because after the mount i am only read option
As mentioned a few times now: you don't need to mount a filesystem in order to use fsck, in fact it's preferred not to.

But since you now mention CRC errors I'm starting to wonder if your harddisk could be dying. If so then there's little which fsck can do here, might be better to start thinking about a replacement.

How do those errors show up? In white bold letters (so: kernel messages)? If so... then I think you got bigger problems here.
 
Back
Top