Find the answer to your Linux question:
Results 1 to 7 of 7
Hi! I installed GRUB2 on a usb stick with: Code: sudo grub-install --boot-directory=/mnt/lfs/boot /dev/sdb down here you can see how is the usb mounted: Code: /dev/sdb1 on /mnt/lfs type ext2 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Posts
    40

    Grub2 in usb stick


    Hi!
    I installed GRUB2 on a usb stick with:
    Code:
    sudo grub-install --boot-directory=/mnt/lfs/boot /dev/sdb
    down here you can see how is the usb mounted:
    Code:
    /dev/sdb1 on /mnt/lfs type ext2 (rw)
    The installation process finished successfully.
    Then I edited grub.cfg in /mnt/lfs/boot/grub to the following:
    Code:
    set default=0
    set timeout=5
    
    insmod ext2
    set root=(hd1,1)
    
    menuentry "LFS test" {
     linux /boot/vmlinuz root=/dev/sdb1 ro
    }
    When I restart the system booting from usb it results in a blank screen with the cursor blinking after 4-5 empty lines. Any idea why it's not showing the boot menu?

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Try replacing root entries from sdb to sda in grub.cfg
    Code:
    set root=(hd0,1)
    
    linux /boot/vmlinuz root=dev/sda1 ro
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Oct 2006
    Posts
    40
    I'm trying it right now. The strange thing is that if I enter the grub shell and try to set the root in linux /boot/vmlinuz root=...
    it doesnt recognize any sd... device?!

  4. #4
    Just Joined!
    Join Date
    Oct 2006
    Posts
    40
    Quote Originally Posted by devils casper View Post
    Try replacing root entries from sdb to sda in grub.cfg
    Code:
    set root=(hd0,1)
    
    linux /boot/vmlinuz root=dev/sda1 ro
    no results

  5. #5
    Just Joined!
    Join Date
    Oct 2006
    Posts
    40
    If I enter the grub shell my usb stick is recognized as (hd1,gpt1) (?), which is quite new naming for me.

  6. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Post the partition structure of stick. Why do you want to manually install GRUB2 in stick. There are a lot of packages available for GRUB install.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  7. #7
    Just Joined!
    Join Date
    Oct 2006
    Posts
    40
    I switched to a HDD partition for now. I created a partition in my HDD (/dev/sda3) and trying to boot the system from there. In the grub shell I write
    Code:
    set default=0 
    set timeout=5
    insmod ext2 
    set root=(hd0, msdos3)
    linux	/boot/vmlinuz root=/dev ro
    boot
    The strange things is that in root=/ if I press <tab> it gives me as possibilities only dev and console! Where are the other partitions?
    It start decompressing the kernel and it stops after a while with a Kernel panic fatal exception!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •