Slackware on VirtualBox, can't upgrade GRUB
I installed Slackware-15 on VirtualBox 7.0.12 and I'm having trouble customizing the GRUB installation:
Code:
# grub-install --version Code:
GRUB_DISABLE_SUBMENU=y Code:
GRUB_DEFAULT="2>1" Code:
... But no matter what I do, I get the same GRUB menu at the beginning. Anyone have any idea what's going on? |
If you have a specific entry in the grub menu you want as the default, the simplest way to get it is to see which entry it is in the menu. If the entry you want is the third entry, you would change for testing purposes, the set default="0" line in grub.cfg and change it to the number 2 as Grub counts from zero. Do not run grub-mkconfig. If it boots the entry you want, make the change permanent by editing the /etc/default/grub file, the line entering the number you want instead of 0 and then run grub-mkconfig.
Quote:
|
Quote:
|
The link below has some relevant information. If you want the generic kernel to boot and the first entry is the huge kernel, why not simply change the linux line to point to the generic kernel in the first entry and add the initrd line?
https://unix.stackexchange.com/quest...-the-second-os I generally modify the grub.cfg file when testing things as it saves time. Make a change to grub.cfg and reboot to test. I don't run grub-mkconfig so it isn't necessary to put the change in the permanent files. If it works, put the change in the appropriate grub file (/etc/default/grub or /etc/grub.d directory) and run grub-mkconfig. Your choice. |
Quote:
|
1 Attachment(s)
Quote:
Attachment 42101 /boot/grub/grubenv does exist - didn't SS that, but I can see it there. the grub.cfg file is complicated (kinda)...it's all about automatically finding kernels, so I don't really know how to write individual entries, a la lilo. |
Quote:
Code:
### BEGIN /etc/grub.d/00_header ### |
/boot/grub/grub.cfg file is the one to edit. If you run grub-mkconfig after editing /boot/grub/grub.cfg the edits will be lost.
Quote:
|
Quote:
Code:
# (I even just tried to comment out everything from if [ "$(next_entry)...else and then fi, so that it would just hit the set default command, and no change in behavior. Can I try to ask something else - is it possible the VirtualBox installation is borked in some strange way? The reason I'm switching from the Slackware huge kernel to the generic one is that when I select the Huge one, it doesn't boot, it just goes and looks for the installation media (the original .iso file), as if the drive is not flagged for booting. If this was a real machine, I would expect some kind of kernel panic if Huge was invalid. Is it possible GRUB is being loaded from some other location, or doing some kind of default script, instead of the one I'm actually editing? |
Quote:
Code:
# fdisk -l Code:
# ls /boot But I shouldn't *need* an efi partition right? GRUB should be able to handle booting being installed to....I dunno, whatever the equivalent of an MBR is for a virtual disk? EDIT: Don't think this helps, but anyway: Code:
# find / -type f -name grub.cfg -print |
The message in the image in post 6 indicates you are trying to write to a read only filesystem. The "canonical path of cow" part.
As has been pointed out to you twice, given your lack of knowledge on the subject, you are best off modifying the /boot/grub/grub.cfg file as root and leaving the other files alone until you have something that has been tested and works. After modifying the file, do NOT run grub-mkconfig. See line 2 in grub.cfg Linux installs on GPT drives in Legacy/CSM mode (which you have, MBR install) generally require a 1MB unformatted partition where the core.img file used by grub is placed. You don't have that and you don't have an EFI partition are you booting the installed system or from the iso in the virtual software? Your Slackware menuentry in grub.cfg should have the 2 lines below at the end of the entry: Quote:
|
Quote:
Quote:
Quote:
|
Quote:
I tried it anyway, but as I've said before, changes to grub.cfg do not have any effect on the GRUB menu, so this change (right or wrong) made no difference. |
To install grub to mbr of a gpt drive that doesn't have a 1mb flagged bios-grub/bios-boot partition is similar to this:
Code:
grub-install --force --target=i386-pc /dev/sda |
Quote:
Code:
# grub-install --force --target=i386-pc /dev/sda |
All times are GMT -5. The time now is 09:05 AM. |