[FreeBSD] USB Install - BSD
Users browsing this thread: 4 Guest(s)
|
|||
USB Install or expert install.
After reading this thread you should know how to install FreeBSD to USB. I run these commands on FreeBSD. What you need : - USB - FreeBSD cd | FreeBSD iso | FreeBSD archives (ftp://ftp.freebsd.org/pub/FreeBSD/releases/) \_ You need at least kernel.txz and base.txz. \_ How to find the packages in FreeBSD iso/cd ? It's in $CD/usr/freebsd-dist/ - Plug in you USB key, a quick look at /var/log/messages should show something like this: (you can use `tail -f /var/log/messages) PHP Code: Jun 8 20:33:30 home kernel: ugen4.2: <USB> at usbus4 - Erase the disk with dd, this should take a few minutes. \_ dd if=/dev/zero of=/dev/da0 count=560 bs=2m - Create the geom and partitions: \_gpart create -s gpt da0 # Create the geom. \_gpart add -s 64K -t freebsd-boot da0 # add the bot partition, 64K should be enough. \_gpart add -s 100M -t freebsd-swap -l swap0 da0 # add the swap partition. I recommend 5-10% of the disk size. \_gpart add -t freebsd-ufs -l disk0 da0 # add the root ufs partition. it will use all the space left. \_newfs -UJt -L freebsdusb /dev/da0p3 # enabling soft-updates and journaling. You can use -t if you want trim (ssd). - Verify everything is correct \_gpart show da0 PHP Code: => 34 15663037 da0 GPT (7.5G) - Mount the root partition \_mount /dev/da0p3 /mnt/usb - Extract at least kernel.txz and base.txz in / on your usb, ilke this: \_ cd /mnt/usb/ \_ tar -xf $packagespath/kernel.txz; tar -xf $packagespath/base.txz - Add the bootcode to your usb installation: \_gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0 - Edit the fstab in /mnt/usb/etc/fstab, add: \_ PHP Code: /dev/da0p3 / ufs rw,async 1 1 - You can now boot with the USB key to try ! - If you get errors like "permission denied" when running as root, run this: \_sysctl kern.geom.debugflags=16 |
|||
|
|||
Thank you was wondering about this sort of thing!
I do Byte
|
|||
|
|||
very relevant for ArchBSD.
|
|||
|
|||
Is this a persistent installation to USB?
|
|||
|
|||
yep, but you can use that to install yo anything
|
|||
|
|||
(30-12-2012, 05:10 AM)Beastie Wrote: yep, but you can use that to install yo anything I just tried it, minus the extracting files from CD (I have none,) and it setup my USB drive perfectly! The only caveat was that I had no /mnt/usb directory, as I've named my USB mount dir a different name. Not really an issue though. Then, to add insult to injury, I didn't have a FreeBSD ISO that I wanted to write to the USB device, so I tried writing a slax memstick image to the USB, but the slax memstick image isn't like most normal .iso files I'm used to... slax-English-US-7.0.2-i486.zip is more geared towards Windoze & *buntu users, and wouldn't write to my USB drive, probably because of the partition layout created above. My advice; if you want to try slax on a USB flash drive, use the CD .iso instead of the memstick .iso. It's not that hard to dd an .iso to the proper location, but the slax bootinst.sh script assumes that one is a moron who uses mainstream operating systems, and so turns the process into more work than it should be. Thanks again for the guide Beastie! Well, my slax endeavor failed, for some reason, but in the meantime, I've found some interesting information about Flash dirves and NAND FLASH storage. Since it's an involved subject, here's a link. (it's not the first time I've dealt with bootable USB drives and writing .iso/.img files to said removable media.) I downloaded slax from here, but don't see any signature, or hash, to verify the integrity of the downloaded file. I tried both versions of the English-US file for my arch (i486) and neither download included any md5sum, etc. The failure to provide any means of verification of the downloaded files causes me to lose faith in the rest of the system. I'll be sticking with FreeBSD from here on out. :) I found some more good info on USB flash drives & FreeBSD here. |
|||