Nethence Newdoc Olddoc Lab Your IP BBDock  

Warning: those guides are mostly obsolete, please have a look at the new documentation.


How to rescue a FreeBSD 8.3 powered Dedibox SC (gen1 & gen 2)
Problem is, the Ubuntu LiveCD (the only one provided by, unfortunately) doesn't provide read-write support for the UFS2 file system type (CONFIG_UFS_FS_WRITE=y is obviously missing in the linux kernel configuration).
Prepare your environment
Start the rescue system (Ubuntu amd64) and proceed,
sudo su -
export LANG=C
export TERM=xterm
Note that it's the BSD slide you would have to mount, not the DOS partition dedicated to FreeBSD, check with,
dmesg | less ==> search for 'sda'
I got,
[ 2.029969] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
[ 2.030036] sd 0:0:0:0: [sda] 4096-byte physical blocks
[ 2.030201] sd 0:0:0:0: [sda] Write Protect is off
[ 2.030260] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 2.030312] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 2.031914] sda: sda1
[ 2.031917] sda1: <bsd: sda5 sda6 >
[ 2.032844] sd 0:0:0:0: [sda] Attached SCSI disk
so you can always mount read-only if you want,
mkdir /lala/
mount -t ufs -r -o ufstype=ufs2 /dev/sda5 /lala/
Read-write workaround using Qemu
Install Qemu,
cd /
wget ""
apt-get update
apt-get install qemu
qemu-system-x86_64 -no-kvm -hda /dev/sda -cdrom FreeBSD-8.3-RELEASE-amd64-bootonly.iso -curses -boot d
note. adding the '-no-kvm' option is important otherwise the underlying system (Ubuntu LiveCD) crashes.
6 (shift and 6 on french keyboard, the layout has passed through) --> boot loader prompt
OK boot -s
(kernel boots...)
note. your file system (here /dev/ad0s1a) get's mounted automaticly, you just have to fsck and re-mount it read-write.
fsck -y /dev/ad0s1a
mount -o rw /
and proceed with your fixes.
Once you are done you can simply,
shutdown -p now
and you will get out of Qemu (otherwise you should have to),
# Ctrl+Alt+2 to open QEMU monitor and 'quit'
# or Ctrl+A+C when you're using -nographics
Additional notes
Alternatives through the network assuming you've got another box close-by at
- using iSCSI but the tgt module doesn't seem to be available,
- using dd through the network.
Error trying to mount FreeBSD/UFS partition from FreeNAS:
Gentoo: Mounting UFS2:
Mounting UFS in read/write under Linux (debian):
QEMU Emulator User Documentation:

(obsolete, see the new doc)