[SOLVED]Need to modify /etc/default/grub before 1st boot
Forum rules
Before you post please read how to get help
Before you post please read how to get help
-
big-red-cow
- Level 1

- Posts: 5
- Joined: Sun May 02, 2021 3:08 pm
[SOLVED]Need to modify /etc/default/grub before 1st boot
I'm installing linuxmint 20.1 xfce to an Acer Chromebook 11 C740. When booting from the live USB, I must first edit the boot parameters for Casper by adding the line i915.fastboot=1, otherwise the screen flashes on and off constantly.
Also, during the install, I need to keep the display active, so I install xscreensaver and set for random screensavers after 1 minute.
All is well, I get the release installed, but after rebooting, there is no way for me to intercept grub and modify the boot parameters prior to getting into the system and adjusting /etc/default/grub and then running update-grub.
Pressing the "normal" keys doesn't help me: I can press Esc or Right-Shift, and the bootup may pause, but I never get into the grub edit.
I realize this is likely a quirk of my Chromebook, as it's not using UEFI unless I'm willing to remove the write-protect and flash the bios.
If I were clever enough, I would chroot into the freshly installed system and fix it myself while I'm still in the live usb. But I'm not quite there yet.
Any ideas?
Also, during the install, I need to keep the display active, so I install xscreensaver and set for random screensavers after 1 minute.
All is well, I get the release installed, but after rebooting, there is no way for me to intercept grub and modify the boot parameters prior to getting into the system and adjusting /etc/default/grub and then running update-grub.
Pressing the "normal" keys doesn't help me: I can press Esc or Right-Shift, and the bootup may pause, but I never get into the grub edit.
I realize this is likely a quirk of my Chromebook, as it's not using UEFI unless I'm willing to remove the write-protect and flash the bios.
If I were clever enough, I would chroot into the freshly installed system and fix it myself while I'm still in the live usb. But I'm not quite there yet.
Any ideas?
Last edited by big-red-cow on Sun May 02, 2021 9:10 pm, edited 1 time in total.
Re: Need to modify /etc/default/grub before 1st boot
By holding Shift, you can go into Advanced Options/Recovery Mode, then "drop to root shell" and you can use a command-line editor like
But you shouldn't have to do all this stuff you are doing. There must be some other solution, some alternative to the
nano to edit /etc/default/grub and update-grub.But you shouldn't have to do all this stuff you are doing. There must be some other solution, some alternative to the
i915.fastboot=1 trick.Re: Need to modify /etc/default/grub before 1st boot
He said he can't get into the Grub menu...
Does it have a regular SATA drive? If so and if it's /dev/sda and your newly installed rootfs is on /dev/sda1 with /boot not split off and, seemingly, in your case no separate EFI system partition on /boot/efi, from a terminal on the Live USB post-install
Feel free of course to use e.g.
Does it have a regular SATA drive? If so and if it's /dev/sda and your newly installed rootfs is on /dev/sda1 with /boot not split off and, seemingly, in your case no separate EFI system partition on /boot/efi, from a terminal on the Live USB post-install
Code: Select all
$ sudo -s
# mount /dev/sda1 /mnt
# vi /mnt/etc/default/grub
# mount --bind /dev /mnt/dev
# mount --bind /sys /mnt/sys
# mount --bind /proc /mnt/proc
# chroot /mnt update-grub
# exit
$
nano rather than vi if you like.Re: Need to modify /etc/default/grub before 1st boot
Oh, wait. But he also said explicitly Right-Shift and it in fact needs to be specifically Left-Shift at least on normal legacy systems.
Re: Need to modify /etc/default/grub before 1st boot
Right, it should be Left Shift.
I understood that he could not get into Grub-edit, not Grub. I guess I don't get it.
I understood that he could not get into Grub-edit, not Grub. I guess I don't get it.
-
big-red-cow
- Level 1

- Posts: 5
- Joined: Sun May 02, 2021 3:08 pm
Re: Need to modify /etc/default/grub before 1st boot
nomodeset is the typical way around incompatible video cards or situations, but this yields a very slow system with the wrong screen dimensions. i915 works great, once I get grub setup. Thanks for your reply.spamegg wrote: ↑Sun May 02, 2021 5:00 pmBy holding Shift, you can go into Advanced Options/Recovery Mode, then "drop to root shell" and you can use a command-line editor likenanoto edit/etc/default/grubandupdate-grub.
But you shouldn't have to do all this stuff you are doing. There must be some other solution, some alternative to thei915.fastboot=1trick.
Re: Need to modify /etc/default/grub before 1st boot
Have you done the above to edit post-install from the live system?
-
big-red-cow
- Level 1

- Posts: 5
- Joined: Sun May 02, 2021 3:08 pm
Re: Need to modify /etc/default/grub before 1st boot
This is exactly what I was looking for! I had to wait until after I chrooted to modify /etc/default/grub, because the changes I made were not getting saved. This is the simplest explanation for using chroot into an existing system. Thank you so much!rene wrote: ↑Sun May 02, 2021 5:11 pmHe said he can't get into the Grub menu...
Does it have a regular SATA drive? If so and if it's /dev/sda and your newly installed rootfs is on /dev/sda1 with /boot not split off and, seemingly, in your case no separate EFI system partition on /boot/efi, from a terminal on the Live USB post-install
Feel free of course to use e.g.Code: Select all
$ sudo -s # mount /dev/sda1 /mnt # vi /mnt/etc/default/grub # mount --bind /dev /mnt/dev # mount --bind /sys /mnt/sys # mount --bind /proc /mnt/proc # chroot /mnt update-grub # exit $nanorather thanviif you like.
-
big-red-cow
- Level 1

- Posts: 5
- Joined: Sun May 02, 2021 3:08 pm
Re: Need to modify /etc/default/grub before 1st boot
I expect you didn't before the chroot say /mnt/etc/default/grub rather than just /etc/default/grub then. But in any case good that it worked; I followed up due to being momentarily "scared" that my own next "Oh, wait" post was taken literally to mean that the chroot advise wouldn't work.big-red-cow wrote: ↑Sun May 02, 2021 9:09 pmI had to wait until after I chrooted to modify /etc/default/grub, because the changes I made were not getting saved.
-
big-red-cow
- Level 1

- Posts: 5
- Joined: Sun May 02, 2021 3:08 pm
Re: Need to modify /etc/default/grub before 1st boot
Duhhh... Yeah, you are correct. I'm pretty sure I left off the /mnt.rene wrote: ↑Sun May 02, 2021 9:17 pmI expect you didn't before the chroot say /mnt/etc/default/grub rather than just /etc/default/grub then. But in any case good that it worked; I followed up due to being momentarily "scared" that my own next "Oh, wait" post was taken literally to mean that the chroot advise wouldn't work.big-red-cow wrote: ↑Sun May 02, 2021 9:09 pmI had to wait until after I chrooted to modify /etc/default/grub, because the changes I made were not getting saved.
No key works at the grub menu: Left-Shift, Right-Shift, or Esc: to stop the boot on my quirky little Chromebook.
Most distros I've seen set the timeout to zero, and the timeout style to hidden, so there is no way I could have solved this without your chroot advice. I've printed this out and saved it in a Linux notebook I keep. Thanks, I can't wait to play around with this idea some more.

