Configuration of FreeBSD Post-Installation
Step 1: Correct the boot and root partition
Suppose you install FreeBSD on a portable drive. Once you finish the installation on one device and boot the system on the other device, the system will have a chance to fail to boot due to different naming scheme on the hard drives on each device.
Specifically, the booting process fails at loading the system partition, with the prompt for you to enter the correct partition. At this session, type "list" to show all the partitions found by the bootloader.
The bootloader shell then shows the list of partitions found. Find the partition that's readable and recognizable to you (i.e., for GPT paritioned hard drive, ignore the partitions labelled with GUID, as they are equivalent to the readable ones.)
Shutdown the running device and go to the device that has the FreeBSD installed. Boot into the system and edit this file: /etc/fstab and change the path to the partition to the one you found at the device you want the system to boot. You also need to change the path to the booting partition with the same naming scheme.
Save the file and quit. Now your FreeBSD can be boot at your designated device!
Step 2: Reconfigure the WLAN interface card
Your system might fail to connect to the network if it is boot on another device, as the identifier on the interface card is different, making ifconfig cannot recognize the card. So a reconfiguration is needed to get the device connected.
1. To check the identifier, put the following command:
sysctl net.wlan.devices
2. Remember the identifier, and put the following command for ifconfig to recognize the device:
ifconfig wlan0 create wlandev [Your device's identifier]
3. If your new device is in a different network, add the network's SSID and passkey to this file: /etc/wpa_supplicant.conf with the folllowing format:
network={
ssid="myssid"
psk="mypsk"
}4. Then go to /etc/rc.conf to change this line:
wlans_[YourPreviousDeviceNIC]="wlan0"
wlans_[YourCurrentDeviceNIC]="wlan0"
service netif restart
留言
張貼留言