Page 54 of 94 FirstFirst ... 444525354555664 ... LastLast
Results 531 to 540 of 931

Thread: Grub 2 Basics

  1. #531
    Join Date
    Sep 2006
    Beans
    39

    Re: Grub 2 Basics

    @drs305 and anyone interested

    I just noticed in the lucid repos a package called

    mbr

    does anyone know of any documentation/help/howto related to this package ?
    the only thing I could find so far is in synaptic that says

    ...'The MBR is used in booting operating systems from the hard disk. It
    runs first, then transfers control to the operating system's loader
    which transfers control to the kernel.'...

    TU.

  2. #532
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by peter b View Post
    does anyone know of any documentation/help/howto related to this package ?
    TU.
    mbr is the linux package that replaced ms-sys and much of what was previously written about ms-sys now can be used with "mbr".

    It can be used to run certain mbr repair functions, of which install-mbr is one. You can read about install-mbr via the man pages ("man install-mbr"). "mbr" can also used in conjunction with "lilo" to repair certain Windows boot problems. I don't have any good links on the use of "mbr" unfortunately.
    New to Wayland.

    Retired.

  3. #533
    Join Date
    Sep 2006
    Beans
    39

    Re: Grub 2 Basics

    thank you drs305; yes, man install-mbr provided some help.

    I'll search further based on install-mbr cmd. once again TU.

  4. #534
    Join Date
    Jul 2008
    Location
    Sydney, Australia
    Beans
    52
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Grub 2 Basics

    Gday,
    I use ubuntu as a backup tool, and it has saved me a few times. But i normally use windows. I would like to disable the GRUB screen that comes up giving me the option of OS. I would like windows to boot first and not have the screen, maybe a button that i depress at start up that can boot ubuntu or something like that. I also want to be able to test HDD's without GRUB load failed Error 17 coming up... any support would be greatly appreciated.
    terryk_tv@hotmail.com
    ~~ add, chat, email ~ It's all good. ~~

  5. #535
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by Terry19 View Post
    Gday,
    I use ubuntu as a backup tool, and it has saved me a few times. But i normally use windows. I would like to disable the GRUB screen that comes up giving me the option of OS. I would like windows to boot first and not have the screen, maybe a button that i depress at start up that can boot ubuntu or something like that. I also want to be able to test HDD's without GRUB load failed Error 17 coming up... any support would be greatly appreciated.
    Terry19,

    If you are getting "Error 17" messages then it is likely you are using Grub legacy and not Grub2. You can check by looking at the version number at the top of the grub menu during boot or by running the following command from a terminal:
    Code:
    grub-install -v
    0.97 is Grub legacy. 1.96 or later is Grub2.11


    If you are using Grub2, section 7 of this guide details how to hide the menu on multi-OS computers:
    http://ubuntuforums.org/showthread.php?t=1287602

    If you are still using Grub legacy it would be best to start a new thread or search older posts which relate to Grub and not Grub2.
    New to Wayland.

    Retired.

  6. #536
    Join Date
    Apr 2008
    Beans
    21

    Re: Grub 2 Basics

    So, you're here because maybe you tried doing what I did, which was a good idea, at first and at last, and should have worked, but didn't. Ahh, the best laid plans of mice and (well, linux makes babies of us all). Remember, don't panic and all will be well. I'm laying out the explicit path to my success, and no more (there was a lot of trying & failing in my process.)

    First, what I tried to do was make my Seagate Freeagent USB disk drive fully bootable, so I'd have all my backup & restore stuff on one external drive, in case of varioius tragedies. It's to house a bootable Ubuntu 10.04, a partimage generated ISO of my filesystem, and a grsync generated set of files which are my periodic incremental backup. Like all good techies, I burned a 10.04 LiveCD from the most recent Ubuntu ISO download before I began. Since that was the only thing I could boot from when my toubles began, I was really glad to have it.

    I booted to the LiveCD and choose the install option, following the menu sequence to install to my seagate drive. I choose to wipe the drive clean. The install reformated it to Ext4, complete with extended & swap partitions, and bootable with an MBR. All that went well and without incident. One note, should you attempt this:
    Carry on working your way through the install until you get to Step 7 - Ready to install. Here click on the Advanced … button. Under Advanced Options make sure that Install boot loader is checked and from the Device for boot loader installation drop down box make sure to choose the correct drive to install the boot loader onto - this is of critical importance if you still have your hard drives fitted!" http://www.zdnet.com/blog/hardware/h...ash-drive/1873
    After successfully installing 10.04 from the LiveCD to the Seagate drive, I rebooted, interrupting the boot with F12, and booting the Seagate, which was listed because grub found all the drives with boot sectors on them. The boot happenned just fine as expected, I'm still in the happy zone. A note about Ubuntu 10.04 - it now comes with a nifty utility at System-->Administration-->Disk Utility which I found quite handy throught my subsequent ordeal. Its a great tool and allows visual inspection of all devices and partitions in play, allows mounting & unmounting, changing the filesystem label and other useful operations. Thank the redhat team!

    So I've at this point booted to the Seagate and it looks great with the new Debian theme and all. I get an Update Manager with critical security updates, and so apply them. Oh, woe is me. The updates happen just fine and then prompts to reboot to finish that process. Which of course means leaving a thread for grub to handle. Rebooting I get:
    error: no such device: a9995eb3c-undecipherable-numeric-gobbly-gook-nonsense
    grub rescue>
    and hangs there waiting for my commands

    What the Fuc%(*&^ do I know about grub or rescuing it? Nada, I say, and so begins a new linux journey. After much research, trial and error, here's what I put into that command line:
    linux /boot/vmlinuz-2.6.32-22-generic root=/dev/sda3 ro
    initrd /boot/initrd.img-2.6.32-22-generic
    boot

    What you put in is dependent on lot's of factors, as previously explained on this post. Mostly, finding the correct root as well as vmlinuz and initrd files for the latest linux kernel on your filesystem. With correct commands, the boot happens, and glory-be, your filesystem gets booted, all configurations intact (it pays not to panic).

    If these grub commands don't work, it may because the grub in operation is old, as it was for me, so first from a LiveCD boot:
    sudo grub-install --root-directory=/media/harddisk /dev/sda
    That may be the first step to take. Doing so will place a lightweight, know nothing grub on your harddisk, but with the necessary shell for a working command set. Figuring out this one step was the most time consuming and frustrating part of my ordeal.

    But all that's not enough, because grub is still mucked up, so, once booted, open a terminal and start a repair:
    sudo update-grub --output=/media/harddisk/boot/grub/grub.cfg
    sudo grub-mkconfig
    sudo grub-install /dev/sda

    Again, these are what worked for me on my machine - your root and device will be whatever is correct for your machine, so find out first. I believe the research & reading to likely be critical to success. Its just a few short commands, but commands issued to the write grub, with the correct syntax and device designations. FYI, after the grub-install, and with grub-mkconfig -v, I see I'm working with /usr/sbin/grub-mkconfig (GNU GRUB 1.98-1ubuntu6), the latest & greatest. Be aware that grub2, like linux and Ubuntu, are in a constant state of flux - its useful to have the latest versions.

    I'm in the happy zone again. Good luck!

    References:
    https://wiki.ubuntu.com/Grub2
    http://grub.org/?q=en/node/2
    Last edited by arkmundi; June 22nd, 2010 at 07:08 PM.

  7. #537
    Join Date
    Sep 2006
    Beans
    39

    Re: Grub 2 Basics

    @drs305, further to previous posts re my crippled HD grub2 boot

    when booting off floppy, lucid uses exclusively the data/modules present on the floppy and obviously on installed lucid /boot/grub ; the entries on MBR are totally by-passed/disregarded (see below reasons what determined this opinion/conclusion). the grub> ls set of commands properly identify, enumerates and list the contents on all HDD. the booting is successful doesn't matter whether the floppy uses msdos fs or isofs. example

    grub> ls
    (host) (hd0) (hd0,10) (hd0,9) (hd0,8) (hd0,7) (hd0,6) (hd0,5) (hd0,1) (hd1) (hd1
    ,2) (hd1,1) (hd2) (hd2,1) (hd3) (hd3,1) (hd4) (hd4,1)
    grub> ls (hd0,10)
    Partition hd0,10: Filesystem type ext2 - Label "lucid" - Last modificati
    on time 2010-06-23 16:51:07 Wednesday, UUID 1034fb62-c437-4b92-8ed8-51b45f116520

    grub> ls (hd0,10)/boot
    System.map-2.6.32-16-generic vmlinuz-2.6.32-16-generic config-2.6.32-16-generic
    abi-2.6.32-16-generic grub/ vmlinuz-2.6.32-17-generic vmcoreinfo-2.6.32-16-gener
    ic initrd.img-2.6.32-16-generic memtest86+.bin System.map-2.6.32-17-generic conf
    ig-2.6.32-17-generic abi-2.6.32-17-generic config-2.6.32-21-generic grub.old/ vm
    coreinfo-2.6.32-17-generic initrd.img-2.6.32-17-generic vmlinuz-2.6.32-18-generi
    c config-2.6.32-18-generic abi-2.6.32-18-generic System.map-2.6.32-18-generic vm
    coreinfo-2.6.32-18-generic initrd.img-2.6.32-18-generic vmlinuz-2.6.32-19-generi
    c config-2.6.32-19-generic abi-2.6.32-19-generic System.map-2.6.32-19-generic vm
    coreinfo-2.6.32-19-generic initrd.img-2.6.32-19-generic abi-2.6.32-21-generic Sy
    stem.map-2.6.32-21-generic vmcoreinfo-2.6.32-21-generic System.map-2.6.32-22-gen
    eric initrd.img-2.6.32-21-generic vmlinuz-2.6.32-21-generic config-2.6.32-22-gen
    eric abi-2.6.32-22-generic vmcoreinfo-2.6.32-22-generic initrd.img-2.6.32-22-gen
    eric vmlinuz-2.6.32-22-generic
    grub>

    and so on which is absolutely correct and in line with what other cmds show - (gparted, fdisk -l etc)

    conversly

    when booting off HD lucid displays the grub-rescue> prompt and the set of ls commands WRONGLY identify/enumerate the HD present. (hd0) is identified as (hd2) which is obviously a non-bootable HD. moreover, the MBR HD installed grub upon entering grub-install -v cmd refuses to identify its version. the partition table in the MBR of sda (hd0) upon inspection in a hex editor shows the first entry

    at offset 01be - a 00 byte or Do not use for booting as correct - indeed it is a pri data partition.
    at offset 01ce - the second partition table entry, the byte is shown as 80 and at - 01d2 - it is identified as 0F or extended partition which is again correct.

    conclusion - the partition table on MBR on sda (hd0) appears correct; the problem seems to be with grub installed on sda MBR that for sure enumerates wrongly the HD's and, maybe (not sure at this time), may have caused problems to the EBR too.

    so, obviously some questions arise

    - why the grub-rescue (when pc booted off HD) identifies/enumerates wrongly the HD's - see above ? grub-install procedure when carried out either from lucid or via chroot with live CD always displays no error messages as reported on prev posts.
    - is there any way to remove the installed sda MBR grub so a new grub install procedure on a clean slate can be carried out with a live CD or after lucid is up booted off floppy ?
    - is there any way to use the proven good data/modules on either floppy or lucid in /boot/grub to rewrite a new grub code to sda MBR and write a new EBR if needed ?

    I am quite sure that within the grub2 knowledge base there is something along removing cleanly grub from MBR (without disturbing the HD data and partitions); if need be I'm quite familiar with working with hex editors that can tackle such tasks (we're lucky that GUID GPT is not implemented yet in the current lucid).

    thanks in advance for your help.

  8. #538
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    peter b,

    There are two ways I think you can accomplish what you want. I would use the first option - purging (completely removing) G2 and then reinstalling it. Do this without your external devices connected. Make sure you have a reliable power source and Internet connection, as you will be left with no bootloader for a minute or so.

    Run these commands. They will uninstall grub-pc and grub-common and then reinstall them. Due to dependencies, both packages do not have to be included in the commands. Make sure you install Grub2 to the drive (sda, etc) and not a partition.
    Code:
    sudo apt-get purge grub-common
    sudo apt-get install grub-pc
    Note: You can use TestDisk to write (clear) the MBR of Grub2. TestDisk is in the "universe" repository.
    Code:
    sudo testdisk
    No Log > Continue > Proceed > Continue > Intel > MBR Code. You don't need to do this if you use the first procedure. Of course, if you do run TestDisk you will have to reinstall Grub2 once you have overwritten the MBR.
    New to Wayland.

    Retired.

  9. #539
    Join Date
    Sep 2006
    Beans
    39

    Re: Grub 2 Basics

    drs305,

    thank you; I shall do that - first option on your reply - over the weekend time permitting with all this world cup action going on in South Africa.

    yes, I'll remove all usb connected devices prior to purging and reinstalling grub.

    btw, should the bootable floppy that I'm currently using be removed too ? will the proposed procedure affect the good bootable status of floppy in any way ?

    this brings up another subject, namely, that for reasons unknown to me lucid decided to stop displaying the floppy device at all, neither as an applet on the upper panel or desktop when asked to be mounted nor when asked to mount it via CLI. example

    sudo mount /dev/fd0 /media/floppy0
    [sudo] password for peter:
    peter@lucidGIGAslow:~$ ls /media/floppy0
    peter@lucidGIGAslow:~$

    as you could see, no message displayed and nothing present on /media/floppy0 (floppy dr light lights up). if floppy removal prior to attempting a purge/rewrite of grub is mandatory then only a physical device removal possible until a solution can be found to this problem.

    some bkgrd re floppy absence/inability to mount - everything was just fine, floppy device shown on the upper panel and could be mounted UNTIL an update was carried out that contained (from /var/log/apt/history.log)

    Start-Date: 2010-06-21 13:48:12
    Upgrade: libcupsppdc1 (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), libcupsimage2 (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), libcupscgi1 (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), libcupsdriver1 (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), cups-client (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), cups-common (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), libcups2 (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), cups (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), cups-bsd (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2), libcupsmime1 (1.4.3-1ubuntu1, 1.4.3-1ubuntu1.2)
    End-Date: 2010-06-21 13:49:18

    lsmod lists floppy and isofs modules. dmesg | tail shows

    [ 4782.605787] ISO 9660 Extensions: RRIP_1991A
    [ 5060.543755] ISO 9660 Extensions: RRIP_1991A
    [ 7482.502125] ISO 9660 Extensions: RRIP_1991A

    any idea what these msgs tell me ?. indeed this bootable floppy has isofs but this does not appear to be the problem, same occurs with floppy w msdos fs.

    I'm fully aware that this thread pertains to G2 but I feel that given the problems I'm having and the only means available is boot successfully off floppy, maybe/hopefully I can find some answers to this floppy related problem. just a note drs305, a little digression, after years of using ubuntu releases I'm still amazed how little attention is paid to getting and making this v sharp tool/device called floppy drive the tool of choice when comes to rescuing a failed os boot; it is v easily and often dismissed as old/ancient tech that does not deserve attention any more and is equally forgotten that innumerable times made and gained top grades in rescuing one of the most nagging pc issues, booting. personally, I'm told that I'm of the old school when there were no CD's, pendrives etc. but this old school boy HAS ALWAYS without any delay made up a rescue floppy IMMEDIATELY after a new release installed, and how well did this served me! never been/happened to be shut out of accessing any os on my pc's. where would I be today without these rescue floppies ? personally, I would make an item under system>pref or admin called create bootable rescue media (w choices floppy, pendrive, etc) and give the user up front the tool/capability to get out of trouble.

    thanks in advance for your help.

  10. #540
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    I don't think the floppy will effect the installation of Grub2. Just use "sudo fdisk -l" to confirm your devices before you choose the device on which to install Grub 2.

    Your description of the floppy situation was very well said but I can't offer much in the way of advice. When a thread gets this long, especially on a very specific topic, there are usually very few 'helpers' that read the new posts. It would probably be best to create a new thread on your floppy problem. I understand why you brought it up in a boot-related thread, but your chance of getting an answer would be much greater if it was placed in its own thread. Keep your Grub2 install posts in here for the time being.
    New to Wayland.

    Retired.

Page 54 of 94 FirstFirst ... 444525354555664 ... 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
  •