summaryrefslogtreecommitdiff
path: root/recipes/initrdscripts/files/85-blockboot.sh
blob: e1c3ed893e0b190d76c857f89046f33217b53aee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
# Allow booting from a normal block device.

if [ -e "$ROOT_DEVICE" ]; then
    echo "booting from: $ROOT_DEVICE"
    type=""
    if [ -n "$ROOT_FSTYPE" ]; then
	type="-t $ROOT_FSTYPE"
    fi
    mount $type "$ROOT_DEVICE" /mnt || fatal "Unable to mount rootfs device"
    BOOT_ROOT=/mnt
fi