LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   new bootable systemrescuecd usb gives unpredicted bootmenu (https://www.linuxquestions.org/questions/linux-newbie-8/new-bootable-systemrescuecd-usb-gives-unpredicted-bootmenu-4175654796/)

hkjz 05-29-2019 02:13 PM

new bootable systemrescuecd usb gives unpredicted bootmenu
 
Hello,

it is following chapter of my bootable usbstick story

1. I've made it bootable

Code:

  134  sudo mkfs.vfat -F 32 -n MULTIBOOT /dev/sdb1
  135  sudo grub-install --force --no-floppy --boot-directory=/mnt/USB/boot /dev/sdb

2. I've copied sysrescd onto usbstick
I have download systemrescuecd, check md5sum, and i've copy content

so now content of stick look like following

Code:

mxx@mxx://media/mxx/MULTIBOOT
$ ls
boot  EFI  isolinux  sysresccd

$ ls -l *
boot:
total 8
drwxr-xr-x 3 mxx mxx 8192 May 28 22:58 grub

EFI:
total 16
drwxr-xr-x 2 mxx mxx 8192 May 28 22:59 archiso
drwxr-xr-x 2 mxx mxx 8192 May 28 22:59 boot

isolinux:
total 184
-rw-r--r-- 1 mxx mxx  2048 May 28 22:59 boot.cat
-rw-r--r-- 1 mxx mxx    432 May 28 22:59 isohdpfx.bin
-rw-r--r-- 1 mxx mxx  38912 May 28 22:59 isolinux.bin
-rw-r--r-- 1 mxx mxx    137 May 28 22:59 isolinux.cfg
-rw-r--r-- 1 mxx mxx 119264 May 28 22:59 ldlinux.c32

sysresccd:
total 40
drwxr-xr-x 4 mxx mxx  8192 May 28 22:59 boot
-rw-r--r-- 1 mxx mxx 11451 May 28 22:59 pkglist.x86_64.txt
-rw-r--r-- 1 mxx mxx    6 May 28 22:59 VERSION
drwxr-xr-x 2 mxx mxx  8192 May 28 23:02 x86_64

The thing is when it boots ive got black screen with information as follows

Code:

GNU GRUB version 2.02~beta3-5+deb9ull

Minimal BASH-like editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists possible device or file completions.

Grub>

im affraid that it is not the sysrescuecd, but some kind of... Grub?
What is this and how can i run the stick so it would start automaticaly with sysrescuecd


ps : it is not possible to register at forum os sysrescuecd to ask some questions there
I were there :
https://forums.system-rescue-cd.org/...?mode=register
Information

Creating a new account is currently not possible.

:(


Thank you! =)

linus72 05-29-2019 02:19 PM

In your boot/grub folder is there a grub.cfg?
If not you need to make one using grub-mkconfig
https://www.gnu.org/software/grub/ma...dmkconfig.html

hkjz 05-29-2019 02:22 PM

i will check out your link

what is there is :

Code:

mxx@mxx:/media/mxx/MULTIBOOT/boot/grub
$ ls
font.pf2  grubsrcd.cfg  x86_64-efi
mxx@mxx:/media/mxx/MULTIBOOT/boot/grub
$ cat grubsrcd.cfg
# Global options
set timeout=90
set default=0
set fallback=1
set pager=1

# Display settings
if loadfont /boot/grub/font.pf2 ; then
        set gfxmode=auto
        insmod efi_gop
        insmod efi_uga
        insmod gfxterm
        insmod all_video
        insmod videotest
        insmod videoinfo
        terminal_output gfxterm
fi

menuentry "Boot SystemRescueCd using default options" {
        set gfxpayload=keep
        linux /sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd archisolabel=SYSRCD603
        initrd /sysresccd/boot/intel_ucode.img /sysresccd/boot/amd_ucode.img /sysresccd/boot/x86_64/sysresccd.img
}

menuentry "Boot SystemRescueCd and copy system to RAM" {
        set gfxpayload=keep
        linux /sysresccd/boot/x86_64/vmlinuz archisobasedir=sysresccd archisolabel=SYSRCD603 copytoram
        initrd /sysresccd/boot/intel_ucode.img /sysresccd/boot/amd_ucode.img /sysresccd/boot/x86_64/sysresccd.img
}


hkjz 05-29-2019 02:32 PM

so now it is installed,
new file appeared,
but there is the same outcome

Code:

GNU GRUB version 2.02~beta3-5+deb9ull

Minimal BASH-like editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists possible device or file completions.

Grub>

grub.cfg is
Code:

$ cat grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
  set default="${next_entry}"
  set next_entry=
  save_env next_entry
  set boot_once=true
else
  set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
  font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  7cc78a3c-9270-4d87-87d3-b80fb7b14b00
else
  search --no-floppy --fs-uuid --set=root 7cc78a3c-9270-4d87-87d3-b80fb7b14b00
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  7cc78a3c-9270-4d87-87d3-b80fb7b14b00
else
  search --no-floppy --fs-uuid --set=root 7cc78a3c-9270-4d87-87d3-b80fb7b14b00
fi
insmod png
if background_image /usr/share/backgrounds/MXLinux/grub/linen-gradientblu-grub.png; then
  true
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
        set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'MX 18.3 Continuum' --class mx --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-7cc78a3c-9270-4d87-87d3-b80fb7b14b00' {
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  7cc78a3c-9270-4d87-87d3-b80fb7b14b00
        else
          search --no-floppy --fs-uuid --set=root 7cc78a3c-9270-4d87-87d3-b80fb7b14b00
        fi
        echo        'Loading Linux 4.19.0-1-amd64 ...'
        linux        /boot/vmlinuz-4.19.0-1-amd64 root=UUID=7cc78a3c-9270-4d87-87d3-b80fb7b14b00 ro  rootdelay=15 quiet splash
        echo        'Loading initial ramdisk ...'
        initrd        /boot/initrd.img-4.19.0-1-amd64
}
submenu 'Advanced options for MX 18.3 Continuum' $menuentry_id_option 'gnulinux-advanced-7cc78a3c-9270-4d87-87d3-b80fb7b14b00' {
        menuentry 'MX 18.3 Continuum, with Linux 4.19.0-1-amd64' --class mx --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-1-amd64-advanced-7cc78a3c-9270-4d87-87d3-b80fb7b14b00' {
                load_video
                insmod gzio
                if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos2'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  7cc78a3c-9270-4d87-87d3-b80fb7b14b00
                else
                  search --no-floppy --fs-uuid --set=root 7cc78a3c-9270-4d87-87d3-b80fb7b14b00
                fi
                echo        'Loading Linux 4.19.0-1-amd64 ...'
                linux        /boot/vmlinuz-4.19.0-1-amd64 root=UUID=7cc78a3c-9270-4d87-87d3-b80fb7b14b00 ro  rootdelay=15 quiet splash
                echo        'Loading initial ramdisk ...'
                initrd        /boot/initrd.img-4.19.0-1-amd64
        }
        menuentry 'MX 18.3 Continuum, with Linux 4.19.0-1-amd64 (systemd)' --class mx --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-1-amd64-init-systemd-7cc78a3c-9270-4d87-87d3-b80fb7b14b00' {
                load_video
                insmod gzio
                if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos2'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  7cc78a3c-9270-4d87-87d3-b80fb7b14b00
                else
                  search --no-floppy --fs-uuid --set=root 7cc78a3c-9270-4d87-87d3-b80fb7b14b00
                fi
                echo        'Loading Linux 4.19.0-1-amd64 ...'
                linux        /boot/vmlinuz-4.19.0-1-amd64 root=UUID=7cc78a3c-9270-4d87-87d3-b80fb7b14b00 ro  rootdelay=15 quiet splash init=/lib/systemd/systemd
                echo        'Loading initial ramdisk ...'
                initrd        /boot/initrd.img-4.19.0-1-amd64
        }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
if [ "${grub_platform}" == "pc" ]; then
menuentry "Memory test (memtest86+)" {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  7cc78a3c-9270-4d87-87d3-b80fb7b14b00
        else
          search --no-floppy --fs-uuid --set=root 7cc78a3c-9270-4d87-87d3-b80fb7b14b00
        fi
        linux16        /boot/memtest86+.bin
}
fi
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-5E1D65F71A1D8925' {
        insmod part_msdos
        insmod ntfs
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  5E1D65F71A1D8925
        else
          search --no-floppy --fs-uuid --set=root 5E1D65F71A1D8925
        fi
        parttool ${root} hidden-
        chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

if there are 3 directories
i will take out some files from sysresccd, to main direcotry, to see if that will change anything
Code:

$ ls
boot  EFI  isolinux  sysresccd


linus72 05-29-2019 02:33 PM

Note because System Rescue CD is now Arch based you must edit where it says "archisolabel=SYSRCD603" in your grubsysrcd.cfg and change it to name of your usb which is Multiboot so it would be archisolabel=MULTIBOOT
You may also be able to change name of grubsysrcd.cfg to grub.cfg and it may boot now but be sure to edit as above

Do not move files around too much or it wont work right, you only need to edit grubsysrcd.cfg/grub.cfg as grub is already installed

hkjz 05-29-2019 02:40 PM

How you know those things Wizard?

linus72 05-29-2019 02:44 PM

LOL because I make multidistro stuff alot like in my links below :)

colorpurple21859 05-29-2019 02:51 PM

Your getting a grub prompt because grub doesn't see grub.cfg file
At the grub prompt
Code:

set
to determine where grub is looking for grub.cfg

linus72 05-29-2019 02:53 PM

colorpurple21859 is a better wizard than me, most here know more than I do, I'm just a doodler
Most things I know are more related to remastering distros and reverse engineering them for different things.

colorpurple21859 05-29-2019 03:05 PM

lol that is all I do is diddle-daddle also. Can't program/script, I like to troubleshoot and figure out why something doesn't work

hkjz 05-29-2019 03:46 PM

OK ive done what you asked
1.
both archisolabel=MULTIBOOT, that didnt help
newly created grub, looks to my amateur eyes more like grub of the MX Linux than actual USBstick grub

2.
Code:

set
...
prefix=(hd1,msdos2)/mnt/USB/boot/grub
...

3. actually when on Linux, USB stick is mounted at /media/mxx/MULTIBOOT, can that be an issue? But this is while MXLinux is already loaded.

Would you be so kind,
and do procedure on your pendrive,
that i performed on my pendrive,
to tell if you can find my mistake, if there is kind of reason,
why i get this GRUB> instead of getting into booting program?

Code:

1. if necessary fdisk to delete everything, all old records and so on
    Open a terminal and type sudo su
    Type fdisk -l (and note which device is your USB Drive)
    Type fdisk /dev/sdx (replacing x with your actual usb device)
    Type d (to delete the existing partition)
    Type n (to create a new partition)
    Type p (for primary partition)
    Type 1 (to create the first partition)
    Press Enter (to use the first cylinder)
    Press Enter again (to use the default value as the last cylinder)
    Type a (for active)
    Type 1 (to mark the first partition active "bootable")
    Type t (for partition type)
    Type c (to use fat32 partition)
    Type w (to write the changes and close fdisk)

2. umount /dev/sdb1
3. mkfs.vfat -F 32 -n MULTIBOOT /dev/sdb
4. grub-install --force --no-floppy --boot-directory=/mnt/USB/boot /dev/sdb
5. copy files from systemrescuecd-6.0.3.iso (downloaded from webside, then md5sum)
6. sync
7. eventualy -- grub-mkconfig -o /$usb/boot/grub/grub.cfg

am i missing something?

linus72 05-29-2019 05:00 PM

try doing grub-mkconfig from your mx install to where boot folder is on your usb, where its mounted

grub-mkconfig -o /media/mxx/MULTIBOOT/boot/grub/grub.cfg

hkjz 05-29-2019 05:09 PM

Yes that what $USB meant when I wrote it

colorpurple21859 05-29-2019 06:49 PM

Quote:

3. mkfs.vfat -F 32 -n MULTIBOOT /dev/sdb
4. grub-install --force --no-floppy --boot-directory=/mnt/USB/boot /dev/sdb
5. copy files from systemrescuecd-6.0.3.iso (downloaded from webside, then md5sum)
6. sync
7. eventualy -- grub-mkconfig -o /$usb/boot/grub/grub.cfg
do grub-install after copying iso files to usb while it is still mounted
Code:

grub-install --force --no-floppy --boot-directory=<usb mount point>/boot /dev/sdb
copy the usb /boot/grub/grubsrcd.cfg to usb /boot/grub/grub.cfg and edit as suggested by linus72 in post 5 because you labeled the sdb1 MULTIBOOT and not SYSRCD603 as suggested here http://www.system-rescue-cd.org/Inst...n-a-USB-stick/

hkjz 05-30-2019 04:04 AM

Victory!

what worked for me was
Code:

lsblk
sudo fdisk /dev/sdx - follow : d;n;4xEnter;a;t;c;w; (delete; create ; 4xapprove; make bootabel; change partition type; choose partition type; write)
mkfs.vfat -F 32 -n NAME /dev/sdx1
sudo mount /dev/sdx1 /$USB
sudo mount /$iso
sudo cp -r /$iso/* /$USB
sync
sudo grub-install --force --no-floppy --boot-directory=/$USB/boot /dev/sdx

cd /$USB/boot/grub
sudo nano grubsrcd.cfg : change both entries "archisolabel=SYSRCD603" to be "archisolabel=NAME" (NAME from mkfs.vfat)
sudo mv grubsrcd.cfg  grub.cfg

DONE

uff


All times are GMT -5. The time now is 08:08 PM.