add grub boot params
This commit is contained in:
parent
913598dc92
commit
1a7c370fe3
1 changed files with 8 additions and 3 deletions
|
@ -50,6 +50,12 @@ sudo mount ${DISK}1 $rootfs_tmpdir
|
|||
# keep right permissions, use sudo
|
||||
sudo tar xf $IMAGE -C $rootfs_tmpdir
|
||||
|
||||
# These are required by grub-install
|
||||
# And also for generating grub config that contains rootfstype
|
||||
for dir in dev proc sys; do
|
||||
sudo mount --bind /${dir} ${rootfs_tmpdir}/${dir}
|
||||
done
|
||||
|
||||
# Add SSH keys
|
||||
run_root mkdir -p root/.ssh
|
||||
sudo cp $SSH_KEYS $rootfs_tmpdir/root/.ssh/authorized_keys
|
||||
|
@ -94,11 +100,10 @@ alpine-unconfigured
|
|||
EOF
|
||||
|
||||
# Setup bootloader
|
||||
for dir in dev proc sys; do
|
||||
sudo mount --bind /${dir} ${rootfs_tmpdir}/${dir}
|
||||
done
|
||||
|
||||
run_root apk add grub-bios
|
||||
echo 'GRUB_CMDLINE_LINUX_DEFAULT="quiet rootfstype=ext4"' >> ${rootfs_tmpdir}/etc/default/grub
|
||||
run_root grub-mkconfig -o /boot/grub/grub.cfg
|
||||
run_root grub-install --target=i386-pc ${DISK}
|
||||
|
||||
# Cleanup
|
||||
|
|
Loading…
Reference in a new issue