#!/bin/ash # tested on ASUS WL 500 GPv2 [OpenWrt Kamikaze 8.09] # echo "USB HDD: partition1: 512 MByte swap; partition2: * MByte for data... [EXT3]" # Automount@boot #1 mkdir -p /mnt/hdd/ opkg update && opkg install kmod-usb2 kmod-usb-storage kmod-fs-ext3 fdisk screen e2fsprogs clear echo "Now use fdisk, and mkfs to make partitions on the USB HDD:" echo "partition1: 512 MByte [SWAP]; partition2: * MByte for data... [EXT3]" echo fdisk -l read screen sync clear # Automount@boot #2 echo "mkdir /mnt/hdd; mount "$(fdisk -l | awk '/Linux/ && /83/ {print $1}')" /mnt/hdd" > /etc/init.d/hdd ln -s ../init.d/hdd /etc/rc.d/S45hdd chmod 755 /etc/init.d/hdd sync /etc/init.d/hdd # Set SWAP@boot on USB HDD opkg install swap-utils echo 'mkswap '$(fdisk -l | awk '/swap/ && /82/ {print $1}') >> /etc/init.d/hdd echo 'swapon '$(fdisk -l | awk '/swap/ && /82/ {print $1}') >> /etc/init.d/hdd sync /etc/init.d/hdd clear mount echo free read |
ui2.: Az fdisk-hez segítség [a példa alapján]:
fdisk /dev/scsi/host0/bus0/target0/lun0/disc n p 1 enter +512mb t 82 n p 2 enter enter t 2 83 w |
mkfs.ext3 /dev/scsi/host0/bus0/target0/lun0/part2 |
Nincsenek megjegyzések:
Megjegyzés küldése