Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question What do these four Grub2 commands mean?


    I'm running Ubuntu 16.04.2 on my Surface Pro 3 and the only way that I can currently boot is by putting in a live USB, pressing C(to get the Grub2 command line), and typing these lines...

    Code:
    set root=(hd1,2)
    linux /vmlinuz root=/dev/sda2
    initrd /initrd.img
    boot
    What do these lines mean and how can I set it up so that it automatically boots into Ubuntu?

  2. #2
    Linux Engineer
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    818
    Code:
    set root=(hd1,2)
    says that you will find grub on the first hardrive on the second partition (/dev/sda2)
    Code:
    linux /vmlinuz root=/dev/sda2
    is stating that kernel is a file called "vmlinuz" and is not in a sub-directory with the (/dev/sda2)
    Code:
    initrd /initrd.img
    is stating the a "initramfs" or "initramdisk" is to be loaded after the kernel is loaded and it is the file "initrd.img" also with out being in a sub-directorty (the '/' rather than '/boot/' which would mean within the sub-directory 'boot' (the same would be true for the linux line).
    Code:
    boot
    means to boot using the above information.

  3. #3
    Thank you, sir.

  4. $spacer_open
    $spacer_close

Posting Permissions

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