0

Minimal BASH-like editing is supported but 'linux' generates an error: "filename expected."

I'd like to get back to the GRUB with options I could arrow-key to highlight.

I've used this guild without an issue but the same primitive GRUB still appears.

Boot-repair, on LiveUSB, allows me to add a repository to the computers source list so I could try its suggestion to install GRUB Legacy or reinstall GRUB if I could add the source.

Is this the right source? If so, the computer's OS source list menu won't allow me to add it.

Perhaps the BASH commands could be used to boot the OS? I can't make it load the kernal.

CloudE11
  • 103
  • If you're talking about grub rescue; it's a program that has to fit in 512 bytes of the MBR, thus has very limited functionality (no capacity to fit a menu there, nor capacity to run bash until a linux kernel has been booted). The linux command sets or loads the kernel that is provided as part of the command (you obviously gave it no filename, thus the 'filename expected' error); the example in the Ubuntu Troubleshooting guide gives the example "linux (hdX,Y)/boot/vmlinuz-3.0.2-14 root=/dev/sda1 ro" (which needs change; no supported release uses 3.0 anymore, X & Y need changing etc) – guiverc Jan 06 '21 at 23:54
  • I did input something for the kernal to load after the command. Would that line do for Focal? And if I've the 20GB partition in sda6, does that make it hd[whatever 'ls' returns ie 'hd[...]6'? I've just used boot-repair to get MBR back and now when I start the PC it says no OS. The cause might be a advanced boot-repair f£4k-up after I'd rescued it. – CloudE11 Jan 07 '21 at 01:21

1 Answers1

0

The cause was as in comments but I'm sure I used these commands in the recovered(via recovery mode) PC before doing some advanced boot-repair things from the PC itself and rebooting to find this issue.

sudo chroot dpkg --configure -a
sudo chroot apt-get install -fy
sudo chroot apt-get purge -y grub*-common shim-signed

Using a LiveUSB with Ubuntu, I resolved it with a basic boot-repair after I restored the MBR(advanced boot-repair option) and rebooted.

Boot-repair advises you use such commands as part of the process so the mistake could be using them in terminal separately but I'm unsure since one of the last commands it suggested is also used to purge unnecessary files. Messing with the old laptop proved its hard to not recover your own machine provided the OS is in order.

CloudE11
  • 103