I need help setting up grub

Trenix25

Member
Credits
508
I need some step by step advice to get grub set up the correct way.

1) I need to install grub on /dev/sda so it only boots Windows, /dev/sda2, regardless of whatever other devices may or may not be connected. I cannot use fdisk.exe /mbr because I don't have it and can't get it. Windows is currently my only way to write a cd or dvd. wodim isn't working. /dev/sda is an internal hard drive.

2) I need to install grub on a secondary USB flash drive so I have a backup stick from which to boot without having to boot from the installation cd again.

3) I need to set up a simple USB flash drive as a boot device that will automatically boot /dev/sdb1 regardless of whatever else may or may not be connected, and then make a second copy of that. /dev/sdb is an external USB hard drive. It is always registering as /dev/sdb without fail.

4) I need to create a cd iso image and write it to a blank cd, and then make a second copy of that. I need either cd to boot /dev/sdb1 regardless of whatever other devices may or may not be connected. /dev/sdb1 is the root Linux file system.

5) I need help getting wodim to work. It writes the disc, and says it didn't have any problems, but I can't mount or access the disk. I used geniosimage to make the iso image from files in a directory. I tried to create a simple non-bootable data disc using iso9660. The image file was approximately 1.6 GB.

I am currently booting from a USB flash drive by catching grub during the boot process when the menu appears and asking for a command prompt. I then use the following commands:

grub> linux (hd0,msdos1)/vmlinuz root=/dev/sdb1 ro
grub > initrd (hd0,msdos1)/initrd.img
grub> boot

(hd0) is a 32G USB flash drive with a single dos mbr partition on it. It uses an ext4 file system.
 


sp331yi

Well-Known Member
Credits
4,614
in a situation like that i usually revert to GRUB4DOS until and if I want to change boot loaders, later. It'll do what you want.
 

Trenix25

Member
Credits
508
These proved to be informative:


 

captain-sensible

Well-Known Member
Credits
7,388
yeah i quite liked those , i'm still digesting EFI , UEFI and how that affects grub2. Dedoimedo is due a new blog post I think ?

For anyone playing with grub i recommend : super_grub2_disk_hybrid_2.04s1.iso


i've got that iso as it is intact and can boot from ventoy
 
Last edited:

Trenix25

Member
Credits
508
They do look a little old.

What's interesting is that Windows can read the DVD I made with genisoimage and wodim, but Linux can't.
 

sp331yi

Well-Known Member
Credits
4,614
This is on a fresh install of Debian 10 -- correct?

Did you get GRUB2 to work, yet, OP?
 

Trenix25

Member
Credits
508
Debian 10.4.0.

I just haven't been able to try much of anything. Our air conditioner has been out for about a week, and during the hottest part of the year. I've been so tired all the time. I can't think straight with this excessive heat. It gets to around 32℃ indoors during the day without relief until early morning hours which is my only decent chance to get some sleep without sweating a river. To make matters worse, the laptop produces a lot of heat.
 


Members online


Latest posts

Top