Page 19 of 94 FirstFirst ... 917181920212969 ... LastLast
Results 181 to 190 of 931

Thread: Grub 2 Basics

  1. #181
    Join Date
    Nov 2009
    Beans
    9

    Re: Grub 2 Basics

    Hi Zika,

    Thanks for your reply.
    This didn't solve the problem. After rename or delete the file /boot/grub/grubenv a new one is created in the next system start and still locking in the menu, without a countdown, after an unsuccessful start

    Cheers.

  2. #182
    Join Date
    Oct 2008
    Location
    ExodusHair<Čubura
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by MCunha View Post
    Hi Zika,

    Thanks for your reply.
    This didn't solve the problem. After rename or delete the file /boot/grub/grubenv a new one is created in the next system start and still locking in the menu, without a countdown, after an unsuccessful start

    Cheers.
    OK. Check if You have a piece of code
    Code:
    if [ ${recordfail} = 1 ]; then
      set timeout=-1<- important!
    else
      set timeout=4<- I use 4, You could use whatever
    fi
    in Your /boot/grub/grub.cfg and if it looks just like this. -1 is important.
    If there is some difference try with this piece of code I gave You. If it proves to be solution then You should check if You have
    Code:
    if [ \${recordfail} = 1 ]; then
      set timeout=-1
    else
      set timeout=${GRUB_TIMEOUT}
    fi
    in Your /etc/grub.d/00_header. -1 is, again, important. Good luck!

  3. #183
    Join Date
    Nov 2009
    Beans
    9

    Re: Grub 2 Basics

    zika, thanks for your help. It did point me in the right direction and I was able to disable the menu after an unsucessful boot!

    But what I change to solve my problem was exactly the "-1" value. I discover the following:

    With -1 will not have a countdown after a fail startup
    With 0 will bypass the menu after a fail startup
    Any value >= 1 will represent the countdown in the menu afte a fail startup.

    All I need to change was the -1 to 0 in /etc/grub.d/00_header and run update-grub2 to solve my issue.

    Many thanks for your help

    Regards.

  4. #184
    Join Date
    Oct 2008
    Location
    ExodusHair<Čubura
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by MCunha View Post
    zika, thanks for your help. It did point me in the right direction and I was able to disable the menu after an unsucessful boot!

    But what I change to solve my problem was exactly the "-1" value. I discover the following:

    With -1 will not have a countdown after a fail startup
    With 0 will bypass the menu after a fail startup
    Any value >= 1 will represent the countdown in the menu afte a fail startup.

    All I need to change was the -1 to 0 in /etc/grub.d/00_header and run update-grub2 to solve my issue.

    Many thanks for your help

    Regards.
    What You did is working by it is not "by the book". You disabled "getting help" after troublesome boot. But, if You're happy, I'm happy too. Have fun!

  5. #185
    Join Date
    Nov 2009
    Beans
    9

    Re: Grub 2 Basics

    Hi zica,

    I don't know 4 sure, but I think "set timeout" is the timeout value if last boot fail (recordfail=1). So, -1 set it off. It's quiet logical.
    Is the same behavior if you set the default timeout to -1 (GRUB_TIMEOUT=-1 in grub.cfg or the second one you are using 4): you will stick on menu for ever in every boot. Give it a try and you will see what happens.

    These lines speaks for then self's:
    Code:
    if [ \${recordfail} = 1 ]; then
      set timeout=-1
    else
      set timeout=${GRUB_TIMEOUT}
    fi
    "if the last startup fails (recordfail=1) there is no countdown in menu (timeout=-1); but (else), if didn't fail the timeout is the one set by the user in grub.cfg (timeout=GRUB_TIMEOUT). That's it (fi).

    If is not it, what else the 1st timeout means? If you put set timeout=15 instead of -1, you will get a 15 seconds countdown after an unsuccessful startup. It is coincidence?

    Cheers.

  6. #186
    Join Date
    Oct 2008
    Location
    ExodusHair<Čubura
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by MCunha View Post
    Hi zica,

    I don't know 4 sure, but I think "set timeout" is the timeout value if last boot fail (recordfail=1). So, -1 set it off. It's quiet logical.
    Is the same behavior if you set the default timeout to -1 (GRUB_TIMEOUT=-1 in grub.cfg or the second one you are using 4): you will stick on menu for ever in every boot. Give it a try and you will see what happens.

    These lines speaks for then self's:
    Code:
    if [ \${recordfail} = 1 ]; then
      set timeout=-1
    else
      set timeout=${GRUB_TIMEOUT}
    fi
    "if the last startup fails (recordfail=1) there is no countdown in menu (timeout=-1); but (else), if didn't fail the timeout is the one set by the user in grub.cfg (timeout=GRUB_TIMEOUT). That's it (fi).

    If is not it, what else the 1st timeout means? If you put set timeout=15 instead of -1, you will get a 15 seconds countdown after an unsuccessful startup. It is coincidence?

    Cheers.
    What I meant is:
    If there is a failure of some sort that set $recordfail then, if You change that value from -1 to something else, You will not get "default" behavior for that situation, You will get "normal" boot. It is, sometimes, useful to have boot stop and wait for You, if there was a problem in previous attempt. That is the purpose, as I see, of that check in program. This way, You have disabled it. I prefer to clean the mess left from un-suscessfull attempt rather than just ignore it. It seems that we are both right and we have different approaches to this thing. I'm OK with that.
    I suspect that You have some other problem masked right now, if the only solution is to change -1 to some positive value. But, that is just my opinion. The very fact that You have difference in behavior while changing that first value proves that You, still, have $recordfail set to true. I would try to reset it, one way was by removing the marker file... Since that did not work, You have to dig further. I might be wrong...
    Update: The first thing that I thought of was that You migh need to check Your FS. You can force fsck on next boot with
    Code:
    sudo touch /forcefsck
    . Put "-1" back in edited file, rename /boot/grub/grubenv and try this. It might solve Your problem.
    Last edited by zika; December 27th, 2009 at 04:12 PM.

  7. #187
    Join Date
    Nov 2005
    Location
    Barcelona
    Beans
    254
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub 2 Basics

    check out this strange thing:

    I just tried installing karmic (vanilla ubuntu-desktop) twice on an eeepc 901 with a 64GB SSD sdb drive from a usb flashdrive (which checks ok). It gave me the same result both times - exits successful, but upon reboot, a black screen with this message:

    Code:
    "Gnu Grub version 1.97~ beta 4 Minimal BASH-like editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device/file completions
    
    rescue:grub> unaligned pointer 0xb8
    
    Aborted. Press any key to exit.
    It doesn't let me press shift to input commands.

    After rebooting from the liveUSB again:

    Code:
    sudo su 
    mount /dev/sdb1 /mnt
    ls /mnt
    shows that the system IS installed:

    Code:
    bin    dev   initrd.img  media  proc  selinux  tmp  vmlinuz
    boot   etc   lib         mnt    root  srv      usr
    cdrom  home  lost+found  opt    sbin  sys      var
    But even attempts to reinstall grub-pc fail:

    Code:
    root@ubuntu:/# grub-install --root-directory=/mnt /dev/sdb
    cp: cannot stat `/mnt/boot/grub/raid.mod': Input/output error
    https://help.ubuntu.com/community/Gr...ing%20GRUB%202

    Code:
    root@ubuntu:/# sudo grub-setup -d /media/1d1163cd-05ed-4458-b64f-db517e82ce4f/boot/grub /dev/sdb
    grub-setup: error: cannot stat /media/1d1163cd-05ed-4458-b64f-db517e82ce4f/boot/grub/boot.img
    but then I realised that I am asking it to restore grub from the installed location, the {/dev/sdb1}/boot/grub, but that they were never properly installed in the first place:

    Code:
    root@ubuntu:/# ls /mnt/boot/grub                                
    ls: cannot access /mnt/boot/grub/core.img: Input/output error
    ls: cannot access /mnt/boot/grub/vga.mod: Input/output error
    ls: cannot access /mnt/boot/grub/ufs1.mod: Input/output error
    ls: cannot access /mnt/boot/grub/serial.mod: Input/output error
    ls: cannot access /mnt/boot/grub/pxeboot.img: Input/output error
    ls: cannot access /mnt/boot/grub/read.mod: Input/output error
    ls: cannot access /mnt/boot/grub/vbeinfo.mod: Input/output error
    ls: cannot access /mnt/boot/grub/test.mod: Input/output error
    ls: cannot access /mnt/boot/grub/scsi.mod: Input/output error
    ls: cannot access /mnt/boot/grub/uhci.mod: Input/output error
    ls: cannot access /mnt/boot/grub/raid6rec.mod: Input/output error
    ls: cannot access /mnt/boot/grub/reiserfs.mod: Input/output error
    ls: cannot access /mnt/boot/grub/usbtest.mod: Input/output error
    ls: cannot access /mnt/boot/grub/efiemu64.o: Input/output error
    ls: cannot access /mnt/boot/grub/tar.mod: Input/output error
    ls: cannot access /mnt/boot/grub/search.mod: Input/output error
    ls: cannot access /mnt/boot/grub/sleep.mod: Input/output error
    ls: cannot access /mnt/boot/grub/sfs.mod: Input/output error
    ls: cannot access /mnt/boot/grub/true.mod: Input/output error
    ls: cannot access /mnt/boot/grub/grubenv: Input/output error
    ls: cannot access /mnt/boot/grub/udf.mod: Input/output error
    ls: cannot access /mnt/boot/grub/vbetest.mod: Input/output error
    ls: cannot access /mnt/boot/grub/raid5rec.mod: Input/output error
    ls: cannot access /mnt/boot/grub/sh.mod: Input/output error
    ls: cannot access /mnt/boot/grub/usb.mod: Input/output error
    ls: cannot access /mnt/boot/grub/cdboot.img: Input/output error
    ls: cannot access /mnt/boot/grub/terminfo.mod: Input/output error
    ls: cannot access /mnt/boot/grub/efiemu32.o: Input/output error
    ls: cannot access /mnt/boot/grub/vbe.mod: Input/output error
    ls: cannot access /mnt/boot/grub/kernel.img: Input/output error
    ls: cannot access /mnt/boot/grub/raid.mod: Input/output error
    ls: cannot access /mnt/boot/grub/reboot.mod: Input/output error
    ls: cannot access /mnt/boot/grub/usb_keyboard.mod: Input/output error
    ls: cannot access /mnt/boot/grub/setjmp.mod: Input/output error
    ls: cannot access /mnt/boot/grub/usbms.mod: Input/output error
    ls: cannot access /mnt/boot/grub/ufs2.mod: Input/output error
    ls: cannot access /mnt/boot/grub/tga.mod: Input/output error
    ls: cannot access /mnt/boot/grub/diskboot.img: Input/output error
    ls: cannot access /mnt/boot/grub/lnxboot.img: Input/output error
    915resolution.mod  echo.mod       loadenv.mod     raid.mod
    acpi.mod           efiemu.mod     loopback.mod    raid5rec.mod
    affs.mod           efiemu32.o     ls.mod          raid6rec.mod
    afs.mod            efiemu64.o     lsmmap.mod      read.mod
    afs_be.mod         elf.mod        lspci.mod       reboot.mod
    aout.mod           ext2.mod       lvm.mod         reiserfs.mod
    at_keyboard.mod    extcmd.mod     mdraid.mod      scsi.mod
    ata.mod            fat.mod        memdisk.mod     search.mod
    ata_pthru.mod      font.mod       memrw.mod       serial.mod
    befs.mod           fs_file.mod    minicmd.mod     setjmp.mod
    befs_be.mod        fs_uuid.mod    minix.mod       sfs.mod
    biosdisk.mod       fshelp.mod     mmap.mod        sh.mod
    bitmap.mod         gfxterm.mod    msdospart.mod   sleep.mod
    blocklist.mod      gptsync.mod    multiboot.mod   tar.mod
    boot.mod           grub.cfg       normal.mod      terminfo.mod
    bsd.mod            grubenv        ntfs.mod        test.mod
    bufio.mod          gzio.mod       ntfscomp.mod    tga.mod
    cat.mod            halt.mod       ohci.mod        true.mod
    cdboot.img         handler.mod    part_acorn.mod  udf.mod
    chain.mod          hdparm.mod     part_amiga.mod  ufs1.mod
    cmp.mod            hello.mod      part_apple.mod  ufs2.mod
    configfile.mod     help.mod       part_gpt.mod    uhci.mod
    core.img           hexdump.mod    part_msdos.mod  usb.mod
    cpio.mod           hfs.mod        part_sun.mod    usb_keyboard.mod
    cpuid.mod          hfsplus.mod    parttool.mod    usbms.mod
    crc.mod            iso9660.mod    password.mod    usbtest.mod
    date.mod           jfs.mod        pci.mod         vbe.mod
    datehook.mod       jpeg.mod       play.mod        vbeinfo.mod
    datetime.mod       kernel.img     png.mod         vbetest.mod
    device.map         keystatus.mod  probe.mod       vga.mod
    diskboot.img       linux.mod      pxe.mod
    dm_nv.mod          linux16.mod    pxeboot.img
    drivemap.mod       lnxboot.img    pxecmd.mod
    I guess i must have filesystem errors, and not just a problem with GRUB? its a brand new drive, straight from the factory, and i added the partition table during the install. its ext3, and checks clean:

    Code:
    root@ubuntu:/# fsck /dev/sdb1
    fsck from util-linux-ng 2.16
    e2fsck 1.41.9 (22-Aug-2009)
    /dev/sdb1: clean, 132935/3817472 files, 848030/15269774 blocks
    any ideas?

  8. #188
    Join Date
    Nov 2005
    Location
    Barcelona
    Beans
    254
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Grub 2 Basics

    I also tried reinstalling grub as recommended on this tutorial, to no avail:

    Code:
    root@ubuntu:/# grub-install /dev/sdb
    grub-probe: error: cannot find a device for /boot/grub.
    
    No path or device is specified.
    Try ``grub-probe --help'' for more information.
    Auto-detection of a filesystem module failed.
    Please specify the module with the option `--modules' explicitly.
    I guess I should console myself that I'm learning, right?

  9. #189
    Join Date
    Aug 2008
    Location
    South East Montana
    Beans
    6,153

    Re: Grub 2 Basics

    I do not know why folks insist on going to blogs and then come to the community. Try community resources first;

    https://wiki.ubuntu.com/Grub2#Recove...20via%20LiveCD

    If you have not tried that, I hope the other did not screw your system.

    From you LiveCD, before you try the above, check the /etc/default/grub file and the /etc/grub.d directory and see if they are whole and how you want them.

    That way you can ignore the instructions on editing files and just do the update and install stuff.
    Dell 480 XPS 3G ram Quad Core 2.40GHz, Radeon HD 2400 PRO, Audigy1, 3x320G HDD, 320G External, Debian Testing for use, Debian Squeeze for secure use, Debian Sid for FUN

  10. #190
    Join Date
    Dec 2007
    Location
    New Orleans
    Beans
    13
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    ...and just who is served by this "new and improved", pardon me, crap? Why would I care where on my hard-drive this kernel or that o.s. is located? Does anyone really expect the people that Canonical is trying to attract (Windows users) to be able to deal with this?

Page 19 of 94 FirstFirst ... 917181920212969 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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