Aici veti gasi detalii tehnice despre cum se pot realiza configurari software+ hardware.
Here you can find tehnical details about software/hardware configuration.

miercuri, 5 august 2009

Installing FreeBSD onto a USB stick

The easy way



A little secret - the easy way to do this is to boot from the installation CDROM while you have the USB stick in and just install to it.



You didn't come here for that though, did you?



The slightly more involved way



It doesn't qualify as "hard".



You'll still need to grab that ISO — get the latest one.




  • Mount that ISO on /dist:



     # mkdir /dist
# mdconfig -a -f /a/FreeBSD/6.1-BETA4-i386-disc1.iso
md17
# mount -t cd9660 /dev/md17 /dist



  • Insert the stick. They come preformatted with a FAT32 partition on, so we'll need to throw a BSD slice label on there — this command will destroy all existing slices. If you get a warning regarding "Geom not found", don't worry.:



    # fdisk -BI /dev/da0

  • We need a disk label:



    # bsdlabel -B -w da0s1

  • and a filesystem, which we'll mount on /mnt:



    # newfs -U /dev/da0s1a
    /dev/da0s1a: 481.0MB (985040 sectors) block size 16384, fragment size 2048
    using 4 cylinder groups of 120.25MB, 7696 blks, 15424 inodes.
    with soft updates
    super-block backups (for fsck -b #) at:
    160, 246432, 492704, 738976
    # mount /dev/da0s1a /mnt

  • Now to do an install the blindingly easy way:



    # cd /dist/6.1-BETA4/base
    # DESTDIR=/mnt ./install.sh
    You are about to extract the base distribution into /mnt - are you SURE
    you want to do this over your installed system (y/n)? y

  • Since we are using 6.1-BETA4, there is some additional messing about to do. This is very likely to change in later release candidates (since it is somewhat broken), but this works for 6.1-BETA4:



    # cd /dist/6.1-BETA4/kernels
    # DESTDIR=/mnt sh ./install.sh generic
    # rmdir /mnt/boot/kernel
    # mv /mnt/GENERIC /mnt/boot/kernel

  • Make the USB stick bootable:



    # boot0cfg -v -B da0
    # flag start chs type end chs offset size
    1 0x80 0: 1: 1 0xa5 480: 63:32 32 985056


    version=1.0 drive=0x80 mask=0xf ticks=182
    options=packet,update,nosetdrv
    default_selection=F1 (Slice 1)


  • Create an fstab(5) file on the USB stick. Here's a simple one:



    /dev/da0s1a /      ufs    rw                      1 1
    md /tmp mfs rw,-s16M,nosuid,noatime 0 0
    /dev/acd0 /cdrom cd9660 ro,noauto,nosuid 0 0
    proc /proc procfs rw 0 0

  • Install any packages you might want:



    # chroot /mnt /bin/sh
    # pkg_add -r lsof rsync unzip zsh kde...



You're done.

Niciun comentariu:

Map


Visitor Map