Changeset 1950
- Timestamp:
- 07/08/07 01:37:15 (1 year ago)
- Files:
-
- trunk/packages/initramfs/Makefile (modified) (1 diff)
- trunk/packages/initramfs/init.in (modified) (8 diffs)
- trunk/scripts/shutdown-helper (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/packages/initramfs/Makefile
r1927 r1950 42 42 cp /usr/sbin/dmsetup $(WDIR)/sbin 43 43 find /lib/modules/*/kernel/drivers/{ata,base,block,cdrom,ide,message,scsi,pcmcia,usb/{core,host,storage,input}} \ 44 /lib/modules/*/kernel/fs/{mbcache.ko,ext2,ext3,ext4, reiserfs,xfs,fat,vfat,ntfs,isofs,udf,nls} \44 /lib/modules/*/kernel/fs/{mbcache.ko,ext2,ext3,ext4,jbd,reiserfs,xfs,fat,vfat,ntfs,isofs,udf,nls} \ 45 45 /lib/modules/*/kernel/lib -type f | cpio --make-directories -p $(WDIR) 46 46 for a in /lib/modules/* ; do ver=$${a##*/} ; depmod -b $(WDIR) $$ver ; done trunk/packages/initramfs/init.in
r1939 r1950 9 9 root= 10 10 rootdelay= 11 rootfstype= ext3,ext2,auto11 rootfstype=auto 12 12 ro="ro" 13 13 noresume=0 … … 81 81 umount -n /.tmpfs/.cdrom 82 82 /sbin/losetup /dev/loop2 /.tmpfs/.fakecd.iso 83 if [ -d /.tmpfs/.partition ] ; then 84 /sbin/losetup -d /dev/loop3 85 umount -n /.tmpfs/.partition && rm -rf /.tmpfs/.partition 86 fi 83 87 ln -sf /dev/loop2 /dev/lfs-cd 84 88 } … … 97 101 umount -n /.tmpfs/.cdrom 98 102 } 99 100 103 101 104 do_mount_cd() { … … 135 138 fi 136 139 done 137 mkdir /.tmpfs138 mount -n -t tmpfs -o size=90% tmpfs /.tmpfs139 140 mkdir /.tmpfs/.cdrom 140 141 detect_cd_type … … 150 151 mount -n -t ext2 /dev/mapper/lfs-cd /.root 151 152 mount -n --move /.tmpfs /.root/dev/shm 153 if [ "$toram" != 1 ] && [ ! -d /.root/dev/shm/.partition ] ; then 154 cp -a /dev/lfs-cd /.root/dev/lfs-cd 155 fi 152 156 if [ "$toram" != 1 ] ; then 153 cp -a /dev/lfs-cd /.root/dev/lfs-cd154 157 ln -sf /dev/shm/.cdrom/drivers /.root/drivers 155 158 fi … … 162 165 rm -f /.root/etc/udev/rules.d/76-network.rules 163 166 fi 167 } 168 169 do_mount_iso() { 170 DEVICE=${root#iso:} 171 FILE=${DEVICE#*:} 172 DEVICE=${DEVICE%%:*} 173 mkdir /.tmpfs/.partition 174 mount -n -t "$rootfstype" -o "$rootflags" "$DEVICE" /.tmpfs/.partition 175 /sbin/losetup /dev/loop3 "/.tmpfs/.partition/$FILE" 176 ln -sf /dev/loop3 /dev/lfs-cd 177 do_mount_cd 164 178 } 165 179 … … 169 183 rootflags="$rootflags$ro" 170 184 case "$root" in 185 iso:*) 186 mkdir /.tmpfs 187 mount -n -t tmpfs -o size=90% tmpfs /.tmpfs 188 do_mount_iso 189 ;; 171 190 *:*) 172 191 ( IFS=":" ; mknod /dev/root b $root ) … … 177 196 ;; 178 197 "") 198 mkdir /.tmpfs 199 mount -n -t tmpfs -o size=90% tmpfs /.tmpfs 179 200 do_mount_cd 180 201 ;; trunk/scripts/shutdown-helper
r1908 r1950 24 24 /dev/console 25 25 /dev/null 26 /dev/lfs-cd27 26 /dev/loop0 27 /dev/loop3 28 28 /dev/mapper/control" 29 29 … … 37 37 esac 38 38 39 if [ ! -b /dev/lfs-cd ] ; then39 if [ ! -b /dev/lfs-cd ] && [ ! -d /.tmpfs/.partition ] ; then 40 40 # The CD has been loaded into RAM 41 41 $HALT … … 46 46 ln -s /proc/mounts /dev/shm/etc/mtab 47 47 echo "$FILES" | cpio -pLd --quiet /dev/shm 48 if [ -b /dev/lfs-cd ] ; then cp -a /dev/lfs-cd /dev/shm/dev/lfs-cd ; fi 49 48 50 cat >/dev/shm/sbin/init <<EOF 49 51 #!/bin/sh … … 67 69 done 68 70 [ "\$TIMEOUT" = "....." ] && fail 71 69 72 dmsetup remove_all || fail 70 73 losetup -d /dev/loop0 || fail 71 74 umount -n /.cdrom || fail 72 eject -r /dev/lfs-cd 73 echo -n "Take the CD, close the CD-ROM tray and press Enter..." 74 ( sleep 30 ; halt ) & 75 read ENTER 75 76 if [ -d /.partition ] ; then 77 losetup -d /dev/loop3 || fail 78 umount -n /.partition || fail 79 fi 80 81 if [ -b /dev/lfs-cd ] ; then 82 eject -r /dev/lfs-cd 83 echo -n "Take the CD, close the CD-ROM tray and press Enter..." 84 ( sleep 30 ; halt ) & 85 read ENTER 86 fi 76 87 halt 77 88 EOF
