Hi guys. I am a newbie in the BSD world. I've been using Linux for a few year just as desktop stuff, no development-related work. A few days ago I decided to give FreeBSD with ZFS a try. Anyway, I installed FreeBSD dual booting Windows in a disk, the laptop is legacy BIOS boot with MBR partition scheme.
Some system info:
And ZFS filesystems:
It was hard to install FreeBSD in a MBR slice with ZFSOnRoot, but I managed it. FYI, this was how I did it: https://gist.github.com/JackieMium/bf8622908bd7e3765b8a7141bb493868 . I wrote it as a note so that someone could found out if there was something wrong.
I am now running FreeBSD RELEASE-13.0-p4 with Xfce4 as DE, Nvidia legacy dirver nvidia-driver-340-340.108_3, everything seems to work just fine, except one ANNOYING thing: I lost bootcode in ada0s4, a lot. Usually, when I reboot, or hard reboot as when I was trying out suspend to RAM (S3 state) and screen wouldn't wake up. The reboot usually failed and stuck at:
forever and the onlything I could do was to reboot into FreeBSD liveCD and install bootcode into ada0s4(a) again by:
It has happened for more ten times over the last a few days and I really have no clue why.
Is it that FreeBSD ZFS_on_Root in a MBR slice dual booting other system not well supported? Or am I doing something wrong and messing with the boot code or kernel? Or am I experiencing this due to some hardware failure? But as I recall. this also happened in a virtual machine with I was trying in VirtualVBox too.
Please help me find out why. If you need more infomation, let me know and I'll add more. Thank you!
Some system info:
Bash:
adam@freebsd: ~ @21:17 % gpart show -p ada0
=> 63 1953525105 ada0 MBR (932G)
63 1985 - free - (993K)
2048 268207168 ada0s1 ntfs (128G)
268209216 960 - free - (480K)
268210176 1169408 ada0s2 !39 (571M)
269379584 629145600 ada0s3 ntfs (300G)
898525184 1054999984 ada0s4 freebsd [active] (503G)
adam@freebsd: ~ @21:17 % gpart show -p ada0s4
=> 0 1054999984 ada0s4 BSD (503G)
0 6291456 ada0s4a freebsd-swap (3.0G)
6291456 1048708528 ada0s4b freebsd-zfs (500G)
adam@freebsd: ~ @21:18 % freebsd-version -kru
13.0-RELEASE-p4
13.0-RELEASE-p4
13.0-RELEASE-p4
adam@freebsd: ~ @21:18 % uname -srm
FreeBSD 13.0-RELEASE-p4 amd64
adam@freebsd: ~ @21:20 % cat /etc/rc.conf
zfs_enable="YES"
hostname="freebsd.asus"
wlans_ath0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
dbus_enable="YES"
lightdm_enable="YES"
kld_list="nvidia fusefs acpi_asus acpi_asus_wmi"
ifconfig_alc0="DHCP"
clear_tmp_enable="YES"
clear_tmp_X="YES"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
dumpdev="AUTO"
rc_startmsgs="NO"
background_dhclient="YES"
adam@freebsd: ~ @21:20 % cat /boot/loader.conf
autoboot_delay="3"
zfs_load="YES"
hw.usb.no_boot_wait=1
# boot and tty resolution and font size
vbe_max_resolution="720p"
screen.font="10x20"
# quiet boot
boot_mute="YES"
hw.acpi.lid_switch_state="S3"
And ZFS filesystems:
Bash:
adam@freebsd: ~ @22:01 % zpool status -v
pool: zroot
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
ada0s4b ONLINE 0 0 0
errors: No known data errors
adam@freebsd: ~ @22:02 % zfs list
NAME USED AVAIL REFER MOUNTPOINT
zroot 35.9G 449G 96K /zroot
zroot/ROOT 3.45G 449G 96K none
zroot/ROOT/default 3.45G 449G 3.45G /
zroot/tmp 148K 449G 148K /tmp
zroot/usr 32.4G 449G 96K /usr
zroot/usr/home 32.4G 449G 32.4G /usr/home
zroot/usr/ports 96K 449G 96K /usr/ports
adam@freebsd: ~ @22:02 % mount
zroot/ROOT/default on / (zfs, local, nfsv4acls)
devfs on /dev (devfs)
zroot/usr/ports on /usr/ports (zfs, local, nosuid, nfsv4acls)
zroot on /zroot (zfs, local, nfsv4acls)
zroot/tmp on /tmp (zfs, local, nosuid, nfsv4acls)
zroot/usr/home on /usr/home (zfs, local, nfsv4acls)
adam@freebsd: ~ @22:02 % cat /etc/fstab
/dev/ada0s4a none swap sw 0 0
It was hard to install FreeBSD in a MBR slice with ZFSOnRoot, but I managed it. FYI, this was how I did it: https://gist.github.com/JackieMium/bf8622908bd7e3765b8a7141bb493868 . I wrote it as a note so that someone could found out if there was something wrong.
I am now running FreeBSD RELEASE-13.0-p4 with Xfce4 as DE, Nvidia legacy dirver nvidia-driver-340-340.108_3, everything seems to work just fine, except one ANNOYING thing: I lost bootcode in ada0s4, a lot. Usually, when I reboot, or hard reboot as when I was trying out suspend to RAM (S3 state) and screen wouldn't wake up. The reboot usually failed and stuck at:
forever and the onlything I could do was to reboot into FreeBSD liveCD and install bootcode into ada0s4(a) again by:
Bash:
dd if=/boot/zfsboot of=/tmp/zfsboot1 count=1
gpart bootcode -b /tmp/zfsboot1 /dev/ada0s4
dd if=/boot/zfsboot of=/dev/ada0s4a skip=1 seek=1024
It has happened for more ten times over the last a few days and I really have no clue why.
Is it that FreeBSD ZFS_on_Root in a MBR slice dual booting other system not well supported? Or am I doing something wrong and messing with the boot code or kernel? Or am I experiencing this due to some hardware failure? But as I recall. this also happened in a virtual machine with I was trying in VirtualVBox too.
Please help me find out why. If you need more infomation, let me know and I'll add more. Thank you!