DISCUSSION: HOWTO GRUB BOOTLOADER AND TROUBLE-SHOOTER
LinuxAnswers DiscussionThis forum is to discuss articles posted to LinuxAnswers.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hello there aus9, you sound very clued up about the GRUB boot-loader. I have a question about it, i have a computer with Red Hat 9 on it, but no boot-loader, which my computer tech loaded for me. he has now left the company, and i do not have contact with him. the red hat computer has been switched off, and the tech did not leave the 'root' password. so my question is, am i able to loader grub onto the computer, through a floppy disk before the login page, as i can not get to the desktop. or do you know of any way that i could load the system, without wiping off the red hat that i have on at the moment?
systemrescue cd
for x86_64-efi usb
su as root or sudo
gdisk /dev/sdX (X from fdisk-l ) to make a gpt (many patition usb)
o
n
default (1)
default (start at begining)
+3G (large enough for systemrescuecd or more)
l (ef00)
x
e
w
mkfs.vfat -F 32 /dev/sdX (X from fdisk-l partition=1)(to format the new partition)
mkdir /mnt/my_usb (my_usb = any name)
mount /dev/sdX1 /mnt/my_usb (X from fdisk-l 1=partition)
download refind-bin zip
sudo ./refind-install --usedefault /dev/sdX1 --alldrivers (X from fdisk-l 1=partition)
grub-install --target=x86_64-efi /dev/sdX (X from fdisk-l 1=partition makes bootable may need --removable option )
(see further down for i386-pc grub.cfg menu)
e2lable, tune2fs -L, ntfslabel, mkfs -L gparted to label (your_label_name) /dev/sdX (X from fdisk-l 1=partition to add in /mnt/my_usb/EFI/boot/refind.conf)
blkid to get UUID or PARTUUID of /dev/sdX (to add in /mnt/my_usb/EFI/boot/refind.conf)
menuentry "Sysrescucd" {
icon /EFI/refind/icons/os_arch.png
# volume "sysrsccd"
loader /EFI/boot/sysresccd/boot/x86_64/vmlinuz
initr /EFI/boot/sysresccd/boot/x86_64/sysresccd.img
options "root=(from blkid) archisobasedir=/EFI/boot/sysresccd archisolabel=(your_label_name) copytoram "
# submenuentry "Boot using fallback initramfs" {
# initrd /boot/initramfs-linux-fallback.img
# }
# submenuentry "Boot to terminal" {
# add_options "systemd.unit=multi-user.target"
# }
# disabled
}
download systemrescuecd iso
mkdir /mnt/iso
mount -o loop systemrescue-11.00-amd64.iso /mnt/iso (iso = any name)
copy /mnt/iso/systemresccd to /mnt/my_usb/EFI/boot
for i386-pc grub.cfg
fdisk /dev/sdX (X from fdisk-l to make a msdos usb)
o (make msdos )
n
p
1 (default
n
default (1)
default (start at begining)
+3G (large enough for systemrescuecd or more)
t 83
mkfs.ext4 or what want on umount /dev/sdX (X from fdisk-l to format partition)
e2lable, tune2fs -L, ntfslabel, mkfs -L gparted to label (your_label_name) /dev/sdX1 (your_lable_name=any name X from fdisk-l to label partition )
mkdir /mnt/my_usb (my_usb = any name)
mount /dev/sdX1 /mnt/my_usb (X from fdisk-l 1=partition)
download systemrescuecd iso
mkdir /mnt/iso
mount -o loop /mnt/iso (iso = any name)
mkdir /mnt/my_usb/boot
mount /dev/sdX1 /mnt/my_usb (my_usb= any name X from fdisk-l 1=partition)
mkdir /mnt/my_usb/boot
download systemrescuecd iso
mkdir /mnt/iso
mount -o loop systemrescue-11.00-amd64.iso /mnt/iso (iso = any name)
copy /mnt/iso/systemresccd to /mnt/my_usb//boot
grub-mkconfig -o /mnt/my_usb/boot/grub/grub.cfg
grub-install --target=i386-pc --boot-directory=/mnt/my_usb/boot --recheck --no-floppy --force /dev/sdX (my_usb = any name X from fdisk-l 1=partition may need --removable option)
this makes grub-install reinstall not possble? can wipe usb with dd and start fresh
e2lable, tune2fs -L, ntfslabel, mkfs -L gparted to label (your_label_name) /dev/sdX (X from fdisk-l 1=partition toadd in /mnt/my_usb/boot/grub/grub.cfg)
menuentry 'sysrecuecd on sda1' {
load\_video
set gfxpayload=keep
insmod gzio
insmod part\_msdos
insmod lvm
insmod ext2
set root='hd0,msdos1'
echo 'Loading Linux linuxv ...'
linux /boot/sysresccd/boot/x86\_64/vmlinuz archisobasedir=/boot/sysresccd archisolabel=(your\_label\_name) copytoram iomem=relaxed
initrd /sysresccd/boot/x86\_64/sysresccd.img
}
if want add menu.lst & grldr(grub4dos) & bootlace.com to /mnt/my_usb to do bootlace.com /dev/sdX (X from fdisk-l 1=partition)
menuentry "boot grldr or ntldr " {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
insmod ntldr
ntldr /grldr
}
Last edited by visigal@gmail.com; 04-17-2024 at 09:48 AM.
su as root or sudo
gdisk /dev/sdX (X from fdisk-l )
o
n
default (1)
default (start at begining)
+3G (large enough for systemrescuecd or more)
l (ef00)
x
e
w
mkfs.vfat -F 32 /dev/sdX (X from fdisk-l partition=1)
mkdir /mnt/my_usb (my_usb = any name)
mount /dev/sdX1 /mnt/my_usb (X from fdisk-l 1=partition)
download refind-bin zip
sudo ./refind-install --usedefault /dev/sdb1 --alldrivers
grub-install --target=x86_64-efi --removable /dev/sdX (X from fdisk-l 1=partition makes bootable)
for refind.conf step furter down
(see further down for i386-pc grub.cfg menu)
mkdir /mnt/my_usb (my_usb = any name)
mount /dev/sdX1 /mnt/my_usb (X from fdisk-l 1=partition)
for me mount /dev/sdb1 /mnt/my_usb
in /mnt/my_usb/EFI/boot/refind.conf
e2lable, tune2fs -L, ntfslabel, mkfs -L gparted to label (your_label_name) usb /dev/sdX (X from fdisk-l 1=partition)
blkid to get UUID or PARTUUID to add to
add in /mnt/my_usb/EFI/boot/refind.conf
menuentry "Sysrescucd" {
icon /EFI/refind/icons/os_arch.png
# volume "sysrsccd"
loader /EFI/boot/sysresccd/boot/x86_64/vmlinuz
initr /EFI/boot/sysresccd/boot/x86_64/sysresccd.img
options "root=(from blkid) archisobasedir=/EFI/boot/sysresccd archisolabel=(your_label_name) copytoram "
# submenuentry "Boot using fallback initramfs" {
# initrd /boot/initramfs-linux-fallback.img
# }
# submenuentry "Boot to terminal" {
# add_options "systemd.unit=multi-user.target"
# }
# disabled
}
download systemrescuecd iso
mkdir /mnt/iso
mount -o loop systemrescue-11.00-amd64.iso /mnt/iso (iso = any name)
copy /mnt/iso/systemresccd to /mnt/my_usb/EFI/boot
for i386-pc grub.cfg
if not already fdisk /dev/sdX (X from fdisk-l )
o (make msdos )
n
p
1 (default
n
default (1)
default (start at begining)
+3G (large enough for systemrescuecd or more)
t 83
fdisk /dev/sdX (X from fdisk-l )
mkfs.ext4 or what want on umount /dev/sdX
e2lable, tune2fs -L, ntfslabel, mkfs -L gparted to label (your_label_name) usb (/dev/sdb1)
mkdir /mnt/my_usb (my_usb = any name)
mount /dev/sdX1 /mnt/my_usb (X from fdisk-l 1=partition)
for me mount /dev/sdb1 /mnt/my_usb
download systemrescuecd iso
mkdir /mnt/iso
mount -o loop /mnt/iso (iso = any name)
mount /dev/sdX1 /mnt/my_usb (my_usb= any name X from fdisk-l 1=partition)
mkdir /mnt/my_usb/boot
download systemrescuecd iso
mkdir /mnt/iso
mount -o loop systemrescue-11.00-amd64.iso /mnt/iso (iso = any name)
copy /mnt/iso/systemresccd to /mnt/my_usb//boot
grub-install --target=i386-pc --boot-directory=/mnt/my_usb/ --recheck --no-floppy --force /dev/sdX (my_usb = any name X from fdisk-l 1=partition)
grub-install --target=i386-pc --removable /dev/sdb (makes bootable)
grub-mkconfig -o /mnt/my_usb/grub/grub.cfg
e2lable, tune2fs -L, ntfslabel, mkfs -L gparted to label (your_label_name) usb /dev/sdX (X from fdisk-l 1=partition)
blkid to get UUID or PARTUUID to add to
add in /mnt/my_usb/grub/
add to grub.cfg
menuentry 'sysrecuecd on sda1' {
load\_video
set gfxpayload=keep
insmod gzio
insmod part\_msdos
insmod lvm
insmod ext2
set root='hd0,msdos1'
echo 'Loading Linux linuxv ...'
linux /boot/sysresccd/boot/x86\_64/vmlinuz archisobasedir=/boot/sysresccd archisolabel=(your\_label\_name) copytoram iomem=relaxed
initrd /sysresccd/boot/x86\_64/sysresccd.img
Is there an actual point to this?? You re-opened a thread that had been closed for *NINETEEN YEARS*, and posted something with zero explanation of what the commands do, single-letters in some cases, with paths that may or may not matter to others. Blindly following anything you've posted here may totally WIPE someone elses system.
Is there an actual point to this?? You re-opened a thread that had been closed for *NINETEEN YEARS*, and posted something with zero explanation of what the commands do, single-letters in some cases, with paths that may or may not matter to others. Blindly following anything you've posted here may totally WIPE someone elses system.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.