[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Curing the cancer called GRUB
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 33
Thread images: 2
File: GRUB_screenshot.png (2 KB, 580x320) Image search: [Google]
GRUB_screenshot.png
2 KB, 580x320
My custom Linux kernel takes 3 secs to boot on my Thinkpad. The BIOS takes around 5 to get to the 1st stage boot loader. GRUB takes 10 to load itself.

I was thinking the following: Write a bootloader that takes the kernel and initrd from the raw hard drive like an embedded system. So it would go like this:

MBR_PARTTABLE_KERNEL_INITRD_FIRSTPART

That way it does not need to mount a partition, read from it, read the 2nd stage bootloader, read that one and then load kernel and boot. This way i can just load in the kernel raw from the SSD.

Any thoughts?
>>
>>55207170
What does "boot" mean?
>>
>>55207170
the first stage of the bootloader is limited to 510 bytes.

there's a reason the second stage exists.
>>
Use LiLO
>>
>>55207170
Good luck doing all that in 510 bytes mate. There's a reason there's 2 stages.You could definitely write your own minimal second stage but trust me when I say it's not worth the effort.
>>
>>55207228

GRUB is a 2 stage bootloader. MBR stage 1 reads disk and loads GRUB stage 2 into memory from disk, as a kernel and initrd cant fit into the mbr

>>55207206

move kernel from disk to memory and execute it
>>
>>55207335
my point was that you're not going to fit your entire boot loader into the mbr - you will still need 2 stages.
>>
just use efi :^)
>>
>>55207170
>The BIOS takes around 5 to get to the 1st stage boot loader. GRUB takes 10 to load itself.
What the fuck did you fuck up? Even on an HDD GRUB never took that long to start up.
>>
is it really worth it though? how often do you restart your computer?
>>
>>55207170
works on my musheen.
>>
>10 seconds to load
My shitbox at home boots grub in like three seconds.
>>
>>55207170
Get rid of the initramfs (make sure you compile anything you need for booting like filesystems and sata drivers statically, i.e not as modules) and use lilo.
>>
File: ayylmao.png (88 KB, 960x528) Image search: [Google]
ayylmao.png
88 KB, 960x528
Compile your kernel as an efi executable and boot it directly from EFI.
>>
My Libreboot BIOS uses GRUB as the bootloader. It's nice.
>>
>>55207170
Never turn off your computer.
>>
>>55207230
It's orphaned and no longer being maintained by the developer.

Just use GRUB2.
>>
>>55207170
>GRUB takes 10 to load itself
What
>>
>>55207500
MBR isn't fixed size though?
>>
Are you sure you're not confusing the wait time of GRUB?
You can adjust that, you know?
>>
>>55207170
If you have EFI capability, switch to an EFI Stub Loader like rEFInd and a GUID Partition Table. Otherwise, just stick with Grub. It sucks but it works.
>>
>>55207581
What's the problem with efi? I have found refind the most straight forward
>>
>>55208305
Encrypted drive
>>
>>55208905
if using an old thinkpad and it works, what does it matter that it is not maintained?
>>
>>55207170
Install freedos and use loadlin ;^)
>>
>>55207170
I stole and partially rewrote something close:

https://github.com/wiktor-b/mlb
>>
>>55207170
INSTALL WINDOWS
>>
>>55209308
Libreboot won't support booting it.
>>
>>55207170
On my T60p Grub takes like 2~3s to load (even when I installed a custom theme).
The fuck you've done op?
>>
Syslinux is fast as fuck
>>
>>55208779
That might be a shitpost, but this is kinda what gahnoo+linucks is made for, so OP should try this.
>>
>>55207170
I boot from a ssd and its almost instantaneous. Fast as shit
>>
>>55207170
install refind
Thread replies: 33
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.