grub-devel
[Top][All Lists]
Advanced

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

Re: Grub saved my Laptop, and made it usable. so i wanted to say thanks


From: James Wabi
Subject: Re: Grub saved my Laptop, and made it usable. so i wanted to say thanks to everybody that worked on it.
Date: Sat, 26 Nov 2022 22:22:14 -0300

Thank you Glenn !
Your answer was very helpful, the Cutmem i think worked, but the other one did not.

From a machine that had already usuntu installed and running, i knew that if the modifications worked, then if i run in terminal sudo Dmesg , i should see something like this:
[    0.000000] reserve setup_data: [mem 0x00000000b4018000-0x00000000b401cfff] reserved
[    0.000000] reserve setup_data: [mem 0x00000000b2018000-0x00000000b201cfff] reserved


1) So, I started from scratch with an ubuntu iso and rufus. and modified boot/grub/grug.cfg like you said.

menuentry "Ubuntu (safe graphics)" {
set gfxpayload=keep
linux /casper/vmlinuz nomodeset file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash ---
memmap=16K\$0x0000000B4018000,16K\$0x0000000B2018000,4K\$0x0000000B401C000,4K\$0x0000000B201C000
initrd /casper/initrd
}


I was able to boot ubuntu from liveusb, and did sudo Dmesg, i could not find any address for b4018000 nor b2018000
so pretty much for me it means it failed, and if i run any program later on there is a high chance that it will crash because of bad memory.



2) So i went back to boot/grub/grug.cfg and added as the first lines the one you told me:

cutmem 2949216K 2949232K  
cutmem 2916448K 2916464K  
cutmem 2949232K 2949236K
cutmem 2916464K 2916468K


booted ubuntu live usb, did sudo dmesg ,and i found some "unusable" addresses for bios-e820 that matched b4018000 and b2018000
[    0.000000] BIOS-e820: [mem 0x00000000b2018000-0x00000000b201cfff] unusable
[    0.000000] BIOS-e820: [mem 0x00000000b4018000-0x00000000b401cfff] unusable


so pretty much i think the cutmem worked! just need to test for many hours that there are no crashes using live usb.
At least now i might be able to boot many different linux distros from live USB too! which is what i was looking for!!

thanks!






On Sat, Nov 26, 2022 at 1:52 AM Project Development <development@efficientek.com> wrote:
On Mon, Nov 7, 2022 at 9:50 AM James Wabi <imitomx1978@gmail.com> wrote:
>
> Thanks vladimir, sadly it did not work. What i did was to include the memmap line like this on boot/grub/grub.cfg
>
>
> # This Menu entry brought to you courtesy of https://www.pendrivelinux.com/install-grub2-on-usb-from-ubuntu-linux/
> set timeout=10
> set default=0
>
> menuentry "Run Ubuntu Live ISO" {
>  loopback loop /ubuntu.iso
>  linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu.iso splash -- memmap=16K\\\$0x0000000B4018000,16K\\\$0x0000000B2018000,4K\\\$0x0000000B401C000,4K\\\$0x0000000B201C000

I bet your problem here is one too many levels of escaping being done. Try:

  linux (loop)/casper/vmlinuz boot=casper
iso-scan/filename=/ubuntu.iso splash --
memmap=16K\$0x0000000B4018000,16K\$0x0000000B2018000,4K\$0x0000000B401C000,4K\$0x0000000B201C000

A little more generic, and not linux specific way would be to use
GRUB's cutmem command[1]. Based on the documentation, I think you
could have the following lines at the top of the grub config:

 cutmem 2949216K 2949232K
 cutmem 2916448K 2916464K
 cutmem 2949232K 2949236K
 cutmem 2916464K 2916468K

Glenn

[1] https://www.gnu.org/software/grub/manual/grub/html_node/cutmem.html

>
>  initrd (loop)/casper/initrd
> }
>
> Then i booted ubuntu from live usb, and i wanted to double check if those areas in the memory were reserved. So i opened terminal, and executed :  dmesg
> A long list of reserved things were displayed but nothing related to those specific memory addresses.
>
> regards!

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

reply via email to

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