summaryrefslogtreecommitdiff
path: root/src/initrd/grok-block
diff options
context:
space:
mode:
Diffstat (limited to 'src/initrd/grok-block')
-rwxr-xr-xsrc/initrd/grok-block20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/initrd/grok-block b/src/initrd/grok-block
index 1152584..d3fe7a2 100755
--- a/src/initrd/grok-block
+++ b/src/initrd/grok-block
@@ -136,14 +136,15 @@ grok_block()
136 esac 136 esac
137 137
138 # Skip partitions that we created. 138 # Skip partitions that we created.
139 # TODO: make these names more unique 139 # The name 'samizdat-plaintext' is recognized and used to add the menu entry, below.
140 case "$DEVNAME" in
141 # Avoid mouting this multiple times in case this script gets called multiple times,
142 # because while it's mounted, the dmsetup stuff will fail with device busy.
143 /dev/nbd0) [ -e /bootwait/samizdat-nbd-dev ] && return ;;
144 esac
140 case "$ID_PART_ENTRY_NAME" in 145 case "$ID_PART_ENTRY_NAME" in
141 samizdat-grub-incomplete|samizdat-plaintext-incomplete|samizdat-luks-encrypted-incomplete) return ;; 146 samizdat-grub-incomplete|samizdat-plaintext-incomplete|samizdat-luks-encrypted-incomplete) return ;;
142 samizdat-grub|samizdat-plaintext|samizdat-luks-encrypted) 147 samizdat-grub|samizdat-luks-encrypted) return ;;
143 # TODO: Possibly only some of these are complete
144 addmenu_choose_native_root "$(parent_device "$DEVNAME")"
145 return
146 ;;
147 esac 148 esac
148 149
149 if [ "$ID_FS_TYPE" = hfsplus ] && ! fsck.hfsplus -q "$DEVNAME"; then 150 if [ "$ID_FS_TYPE" = hfsplus ] && ! fsck.hfsplus -q "$DEVNAME"; then
@@ -168,6 +169,13 @@ grok_block()
168 # TODO: Need option to boot the partitions we create 169 # TODO: Need option to boot the partitions we create
169 # TODO: And what if we create partitions and then reboot the machine mid-install? 170 # TODO: And what if we create partitions and then reboot the machine mid-install?
170 171
172 elif [ "$ID_PART_ENTRY_NAME" = samizdat-plaintext ]; then
173 # TODO: First ensure we can decrypt the key
174 if [ -e "$mountpoint"/disk.key ]; then
175 addmenu_choose_native_root "$(parent_device "$DEVNAME")"
176 fi
177 umount "$mountpoint"
178
171 elif [ "$DEVNAME" = /dev/nbd0 ]; then 179 elif [ "$DEVNAME" = /dev/nbd0 ]; then
172 # This is our rootfs, over the network 180 # This is our rootfs, over the network
173 umount "$mountpoint" 181 umount "$mountpoint"