USB installation on multiple computers

Hi all

I've installed FreeBSD 7.2 on an USB stick. This works fine on the computer I installed it on, but if I want to use it on another computer it wont boot. I've figured out the problem - on my stationary pc the usb port I use is called da4 and on the laptop it's da0. The only way I've found so far is to manually edit the /etc/fstab file on one computer before using it on another. Does anybody in here know of a better way of doint this (automagically) ?

Regards,
Tommy
 
I haven't looked at the USB installer, but I'm surprised to hear that it sounds like they didn't build it to use labels instead of device nodes. You can fix that by using labels.

Insert the USB stick into a working system. Assuming it is /dev/da0s1 do the following:

Code:
tunefs -L InstallRoot /dev/da0s1a

Then mount /dev/da0s1a, edit fstab in its /etc and replace the / filesystem's device name with /dev/ufs/InstallRoot.

I'm assuming there is only a / filesystem on the installer image. If there are more, create unique labels for all of them and edit fstab accordingly.

This will only work if the installer's kernel has glabel enabled - it probably is.
 
Hi Aragon, and thanks for replying

I didn't use an usb installer - I used the regular DVD and selected the USB drive instead of a regular drive to install on.

Anyways - I tried your suggestion but it didn't work. I got the error message "failed to write superblock". I also tried to boot into single user mode and run fchk, rebootet and tried again to no avail. I also tried to enable the various options with tunefs but they all returned the same error message (after saying the option was enabled).
 
If the root filesystem given in fstab not exists my system drops into the bootloader where I type ufs:da?s1a for the right device.
If it's not marked clean it won't work and must be fsck'd on another system first.
 
@Aragon - Thanks for the link. At work now, but I'll try it when I get home
@MG - Yes - that's what happens to me too, but I'd prefer if it's more automated :)
 
Back
Top