yasunari@qube:/mnt/disk1/share/hackkit/current$ diff -u ../110112/hackkit_squeeze_110112.sh hackkit_wheezy_130621.sh --- ../110112/hackkit_squeeze_110112.sh 2011-01-12 00:26:28.977137792 +0900 +++ hackkit_wheezy_130621.sh 2013-06-21 22:38:41.083995000 +0900 @@ -13,8 +13,8 @@ HOSTNAME=hackkit WORK=/mnt/disk1/share/hackkit -HACKKIT=$WORK/hackkit_squeeze_110103.tar.gz -MOUNTPOINT=/mnt/debinst +HACKKIT=$WORK/hackkit_wheezy_130621.tar.gz +MOUNTPOINT=/mnt/disk1/debinst cd $WORK @@ -26,17 +26,23 @@ BOOTPARTITION=/dev/sdb1 BOOTPARTITIONTYPE=ext3 ROOTPARTITION=/dev/sdb2 +ROOTPARTITIONTYPE=xfs SWAPPARTITION=/dev/sdb3 DATAPARTITION=/dev/sdb4 ETH=eth0 RAID=no +LOCALDISK=no #====================================================================== # 各パーティションのフォーマット(RAID 機以外) format_disk() { + if [ $LOCALDISK = yes ] + then + return + fi if [ $RAID = yes ] then return @@ -53,6 +59,7 @@ fi # / + ## ToDo ROOTPARTITIONTYPE mkfs.xfs -f $ROOTPARTITION || exit # swap @@ -68,6 +75,15 @@ # / のマウント mount_root() { + if [ $LOCALDISK = yes ] + then + if [ ! -d $MOUNTPOINT ] + then + mkdir $MOUNTPOINT || exit + fi + return + fi + if [ $RAID = yes ] then echo building md... @@ -80,7 +96,7 @@ then mkdir $MOUNTPOINT || exit fi - mount -t xfs $ROOTPARTITION $MOUNTPOINT || exit + mount -t $ROOTPARTITIONTYPE $ROOTPARTITION $MOUNTPOINT || exit if [ $RAID = yes ] then @@ -453,6 +469,10 @@ echo on > /proc/buffalo/usb_control fi + if [ -f /lib/modules/*/kernel/drivers/usb/usb-common.ko ] + then + insmod /lib/modules/*/kernel/drivers/usb/usb-common.ko + fi if [ -f /lib/modules/*/kernel/drivers/usb/core/usbcore.ko ] then insmod /lib/modules/*/kernel/drivers/usb/core/usbcore.ko @@ -486,44 +506,48 @@ then insmod /lib/modules/*/kernel/fs/fat/fat.ko fi - if [ -f /lib/modules/*/kernel/fs/vfat/vfat.ko ] + if [ -f /lib/modules/*/kernel/fs/fat/vfat.ko ] then - insmod /lib/modules/*/kernel/fs/vfat/vfat.ko + insmod /lib/modules/*/kernel/fs/fat/vfat.ko fi ;; stop) - if [ -f /lib/modules/*/kernel/fs/vfat/vfat.ko ] + if [ -f /lib/modules/*/kernel/fs/fat/vfat.ko ] then rmmod vfat.ko fi - if [ -f /lib/modules/*/kernel/fs/vfat/fat.ko ] + if [ -f /lib/modules/*/kernel/fs/fat/fat.ko ] then rmmod fat.ko fi - if [ -f /lib/modules/*/kernel/fs/vfat/usblp.ko ] + if [ -f /lib/modules/*/kernel/drivers/usb/class/usblp.ko ] then rmmod usblp.ko fi - if [ -f /lib/modules/*/kernel/fs/vfat/usb-storage.ko ] + if [ -f /lib/modules/*/kernel/drivers/usb/storage/usb-storage.ko ] then rmmod usb-storage.ko fi - if [ -f /lib/modules/*/kernel/fs/vfat/uhci-hcd.ko ] + if [ -f /lib/modules/*/kernel/drivers/usb/host/uhci-hcd.ko ] then rmmod uhci-hcd.ko fi - if [ -f /lib/modules/*/kernel/fs/vfat/ohci-hcd.ko ] + if [ -f /lib/modules/*/kernel/drivers/usb/host/ohci-hcd.ko ] then rmmod ohci-hcd.ko fi - if [ -f /lib/modules/*/kernel/fs/vfat/ehci-hcd.ko ] + if [ -f /lib/modules/*/kernel/drivers/usb/host/ehci-hcd.ko ] then rmmod ehci-hcd.ko fi - if [ -f /lib/modules/*/kernel/fs/vfat/usbcore.ko ] + if [ -f /lib/modules/*/kernel/drivers/usb/core/usbcore.ko ] then rmmod usbcore.ko fi + if [ -f /lib/modules/*/kernel/drivers/usb/usb-common.ko ] + then + rmmod usb-common.ko + fi if [ -e /proc/buffalo/usb_control ] then @@ -600,6 +624,10 @@ # / のアンマウント umount_root() { + if [ $LOCALDISK = yes ] + then + return + fi cd / umount $MOUNTPOINT } @@ -609,6 +637,15 @@ # mount_boot mount_boot() { + if [ $LOCALDISK = yes ] + then + if [ ! -d $MOUNTPOINT/boot ] + then + mkdir -p $MOUNTPOINT/boot || exit + fi + return + fi + echo checking $BOOTPARTITION fsck -f -y $BOOTPARTITION @@ -716,6 +753,10 @@ # umount_boot umount_boot() { + if [ $LOCALDISK = yes ] + then + return + fi echo unmount /boot ... sync @@ -778,11 +819,17 @@ BOOTPARTITION=/dev/md0 BOOTPARTITIONTYPE=ext3 ROOTPARTITION=/dev/md1 + ROOTPARTITIONTYPE=ext3 SWAPPARTITION=/dev/md10 DATAPARTITION="" RAID=yes ;; +0x00000015) + MACHINE=LSAVL + + LOCALDISK=yes + ;; 0x00000016) MACHINE=LSVL ;; @@ -806,6 +853,18 @@ SWAPPARTITION=/dev/md10 DATAPARTITION="" + RAID=yes + ;; +0x00004001) + MACHINE=LSQVL + + BOOTPARTITION=/dev/md0 + BOOTPARTITIONTYPE=ext3 + ROOTPARTITION=/dev/md1 + ROOTPARTITIONTYPE=ext3 + SWAPPARTITION=/dev/md10 + DATAPARTITION="" + RAID=yes ;; *) yasunari@qube:/mnt/disk1/share/hackkit/current$まぁ、一発通しというわけにはいかんだろう
← Debian 7.1 のインストール(1)ディレクトリツリーの作成 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ Debian 7.1 のインストール(3)インストール |
Copyright (C) 2003-2013 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市