help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reconfigure grub in preseed stage during linux installation


From: Artur Korobeynyk
Subject: Reconfigure grub in preseed stage during linux installation
Date: Mon, 23 Apr 2018 15:30:09 +0300

Hi community,
When I install debian using the preseeded file, I have a live USB stick
mounted as sda1 and ssd drive as sdb1. So I install MBR to sdb1 during
installation. But when USB stick is removed afterwards SSD drive becomes
sda1. And /boot/grub/grub.cfg does not work any more. I added a late
command to the preseed file in order to fix that according to the
documentation. It is simple and works if I run it manually on the machine
but fails in preseed stage (the file does not get updated).

My preseed steps are:
d-i preseed/late_command string \
in-target sed -i 's#^\(GRUB_CMDLINE_LINUX_DEFAULT="quiet\)"$#\1
root=/dev/sda1"#' /etc/default/grub ; \
in-target grub-mkconfig -o /boot/grub/grub.cfg ; \
sed -i 's/root\=\/dev\/sdb1/root\=\/dev\/sda1/g'
/target/boot/grub/grub.cfg; \
in-target bash -c 'update-grub';

So can anyone give me a hand in solving it? I asked that on all the related
linux branches of stackexchange but those are quiet for a long time already.
-- 

*Best Regards,**Artur Korobeynyk*


reply via email to

[Prev in Thread] Current Thread [Next in Thread]