]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fixed the creation of the root filesystem
authorHarald Hoyer <harald@redhat.com>
Tue, 24 Mar 2009 10:30:30 +0000 (11:30 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 24 Mar 2009 10:30:30 +0000 (11:30 +0100)
test/make-test-root

index 6b6ea81784a23e4e83463772a105bb59bed213c2..76869f4180a033c7f1ef8d60c4468da988e0196f 100755 (executable)
@@ -1,5 +1,11 @@
 #!/bin/bash
-initdir=$(mktemp -d -t initramfs-test-target-XXXXXXXX)
+
+dd if=/dev/zero of=test/root.ext2 bs=1M count=20
+mke2fs -F test/root.ext2
+mkdir test/mnt
+mount -o loop test/root.ext2 test/mnt
+
+initdir=test/mnt
 kernel=$(uname -r)
 (
     . ./dracut-functions
@@ -10,13 +16,16 @@ kernel=$(uname -r)
 )
 targetfs="$initdir"
 unset initdir
-dd if=/dev/zero of=test/root.ext2 bs=1M count=20
-./dracut -l -i "$targetfs" /source \
-    -m "dash kernel-modules test crypt lvm udev-rules base rootfs-block" \
-    -d "ata_piix ext2 sd_mod" \
-    -f test/initramfs.makeroot
 
-qemu-kvm -hda test/root.ext2 -m 512M -nographic -net none \
-    -kernel "/boot/vmlinuz-$kernel" \
-    -append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81" \
-    -initrd test/initramfs.makeroot
\ No newline at end of file
+umount test/mnt
+rmdir test/mnt
+
+#./dracut -l -i "$targetfs" /source \
+#    -m "dash kernel-modules test crypt lvm udev-rules base rootfs-block" \
+#    -d "ata_piix ext2 sd_mod" \
+#    -f test/initramfs.makeroot
+#
+#qemu-kvm -hda test/root.ext2 -m 512M -nographic -net none \
+#    -kernel "/boot/vmlinuz-$kernel" \
+#    -append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81" \
+#    -initrd test/initramfs.makeroot