Server flash ubuntu

Материал из wiki.nntc.nnov.ru
Перейти к навигации Перейти к поиску
ISOIMAGE=ubuntu-8.04.2-server-amd64.iso
sudo apt-get install syslinux mtools mbr
echo "Use fdisk to manually create a 1GB bootable FAT16 partition."
read -p "Press [Enter] to start the fdisk program..."
sudo fdisk /dev/sdb
sudo mkfs -t vfat /dev/sdb1
sudo mkdir -p /mnt/flash
sudo mount -t vfat /dev/sdb1 /mnt/flash
sudo syslinux -s /dev/sdb1
sudo mkdir -p /mnt/iso
sudo mount -o loop $ISOIMAGE /mnt/iso
sudo cp -R /mnt/iso/isolinux/* /mnt/flash
sudo mv /mnt/flash/isolinux.cfg /mnt/flash/syslinux.cfg
sudo mkdir -p /mnt/flash/install
sudo cp vmlinuz /mnt/flash/install
sudo cp initrd.gz /mnt/flash/install
# clear pool directory, which is unnecessary for installation
# that enables installation on 1G flash; remove if installing on
# bigger devices and you run into problems
sudo rm -rf /mnt/flash/pool
sudo cp $ISOIMAGE /mnt/flash
sudo install-mbr /dev/sdb
sudo umount /mnt/flash
sudo umount /mnt/iso