Linux on second drive

164 views
Skip to first unread message

gargavar

unread,
Mar 10, 2019, 1:31:46 PM3/10/19
to Visual BCD
Hi all,

I need a way to boot my Grub loader on my second hard drive. Unfortunately I can't do this in BIOS without jumping through hoops every time (mainly due to an Intel RAID being enabled for primary drive. (It's an Asus laptop. It's weird.)). I tried the magic F9 key, but that only works if the second drive is Windows. What I need is for Visual BCD Editor to recognise Linux Grub on the second drive. Easy! Yes/No/Maybe?

Kind regards,
Jason

boyans.net

unread,
May 11, 2019, 6:19:46 AM5/11/19
to visua...@googlegroups.com
Not very easy but doable.

The steps for creating a Windows 7/8/10 boot sector loader for Linux

1. Create boot sector loader. with Visual BCDedit.
2. Copy boot code from Linux to Windows drive to file boot.img..
3. Amend boot sector loader to point to file from step 2.
4. Edit boot.img - change byte with position 'disk_magic' from 0x80 to 0x81(second disk)  - any hex-editor will do.

This special byte is the disk number - if Linux is on third disk the value should be 0x82.and so on.

'disk_magic' is 0x64 for GRUB2 loader 
(for legacy GRUB disk_magic is 0x40).

Version 0.9.4 of Visual BCD Editor is doing the steps outlined above on click 
but is still unpublished for wider audience. Sorry.

Good luck!
Reply all
Reply to author
Forward
0 new messages