I am trying to edit /boot/loader.conf in a freeBSD. The system was unable to boot because of some errors made to the file.To rectify removing this errors i have to boot using live CD, mount the /boot partition,edit the file and write the changes. How could i know to locate what to mount , where to mount it and how to get into that slice of drive for editing?
mount a drive in freeBSD to edit a file, using live CD
mount;livecd
I found an answer .Just to let you know, even using an ubuntu live CD, might just not do it.I have used this useful link :# sudo modprobe ufs# mkdir ~/ufs_mount# sudo mount -r -t ufs -o ufstype=ufs2 /dev/sdb1 /home/<your_username>/ufs_mount as home directory name.sdb1 the drive desired to get into..However you cannot write into a file in there.Using -wr instead of -r wont work, you will get an error instead. This should shed more light on thatNow using the live installation disk (or usb) of freeBSD system, will work as follows:after getting into the live CD make the following# gpart show -lyou will see many slices, you will recognize the disk of the form adaN, N integer with slices of their indicated volumes, by going to /dev do -ls you will see names of slices , in my case among them was : ada0p2 which is the drive i need to get into., go to /tmp makdir there , name it ufs_mount. elsewhere mkdir won't work because you are in live CD and most of the folders are read only.After that:mount -wr -t ufs  /dev/ada0p2 /tmp/ufs_mountada0p2 is the name of the drive in my case.Use Vi to edit your file, use cat to verify it and you are done.