Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
Like Tree1Likes
I was dual booting my Acer netbook XP & Ubuntu 11.04 for 5-7 months when it all went wrong. Luckily on the last reboot I noticed a linux menu with ...
  1. #1
    Linux Newbie nichos's Avatar
    Join Date
    Sep 2006
    Location
    S.Bucks / W.London UK
    Posts
    101

    GRUB editing for dual boot

    I was dual booting my Acer netbook XP & Ubuntu 11.04 for 5-7 months when it all went wrong.

    Luckily on the last reboot I noticed a linux menu with 4-5 option, & one was "Acer eRecovery Management" which did the XP installation all on its own giving the option to save & install all files & programs.

    Then, I went & installed Ubuntu 11.04 from my USB stick but, now on boot-up it does not give the XP boot.ini Menu I had before but, the "GNU GRUB" menu with 11 choices for Ubuntu (default) or XP, which is very complicated.

    The rub now is how do I change the default to XP? as the wife gets confused with Linux. I use mostly Ubuntu.
    Any easy way?
    Home build, Asus P5K Premium WiFiiFi Intel,
    Intel Core 2 Quad Pro Q6600 2.4GHz, OCZ Cpu Cooler,
    2x2GB, DDR2 800, GeForce 9800 GTX , Excelsior sata 250gb,
    OCZ 600W Psu, X45, XPpro sp3/Ubuntu 8.10

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    1,946
    If you have 11 choices for Ubuntu you have had some kernel updates. You can see all of the entries in the /boot/grub/grub.cfg file. It will show a menuentry with the kernel version on the linux line. You can either remove entries from grub.cfg so they don't show or delete the kernel. I would strongly suggest that you test each one to make sure it boots without problems before doing any deleting.

    You can change the default menuentry to boot by either going to the /boot/grub/grub.cfg file and near the top of the file changing the entry: set default="0" to another number. Count the menuentry lines until you get to xp. Put that number in the set default. Grub counts in this case from zero, so if your xp is the 5tn entry, put a 4 there.

    You can also do this in the /etc/default/grub file. Near the top of this file is a line: GRUB_DEFAULT=0, change the zero to whatever is the correct number. If you make the change here, open a terminal after and run: sudo update-grub.1

  3. #3
    Linux User ptkobe's Avatar
    Join Date
    Feb 2008
    Location
    Torres Vedras, PT
    Posts
    274
    Don't know how to change back to boot.ini If you configure grub with default to XP, there will be no substantial difference for the XP users.

    To keep grub with default boot set to XP, you may use the GRUB_DEFAULT option on /etc/default/grub (as already said by yancek) or change the /etc/grub.d/30_os-prober file order. Other possibilities exist, but those seems to me the simplest. Take a look at https://help.ubuntu.com/community/Grub2.

    Quote Originally Posted by yancek View Post
    [...] You can change the default menuentry to boot by either going to the /boot/grub/grub.cfg file [...]
    Not a recommended way for grub 2 (https://help.ubuntu.com/community/Gr...iguring_GRUB_2 note).

    Regards
    Luis

    EDIT:
    For the "11 choices", how many different linux kernels do you have listed? (memtest and recovery entries can be disabled)
    If you can, please try:
    $ sudo apt-get autoremove
    $ sudo update-grub
    and check if it has any impact on your boot menu. Thanks.
    Last edited by ptkobe; 10-04-2011 at 03:56 AM.

  4. #4
    Linux Newbie nichos's Avatar
    Join Date
    Sep 2006
    Location
    S.Bucks / W.London UK
    Posts
    101
    Thanx, for the life of me canot find the black screen to type

    $ sudo apt-get autoremove
    $ sudo update-grub

    grub boot menu:-

    0) Ubuntu Linux 3.0.0 generic
    1) -"- (recovery mode)
    2) Memory Test (memtest 86+)
    3) "-" "-" ser console 115200
    4) Wiondows Recovery Environmt (loader) (on/dev/sda1)
    5) MS Win. XO Home edition (on/dev/sda3)

    ...................then it has 4 of these all the same:-

    Linux Mint 11 Katya (11) (on/dev/sda5)
    Last edited by nichos; 10-04-2011 at 10:53 AM.
    Home build, Asus P5K Premium WiFiiFi Intel,
    Intel Core 2 Quad Pro Q6600 2.4GHz, OCZ Cpu Cooler,
    2x2GB, DDR2 800, GeForce 9800 GTX , Excelsior sata 250gb,
    OCZ 600W Psu, X45, XPpro sp3/Ubuntu 8.10

  5. #5
    Linux Newbie nichos's Avatar
    Join Date
    Sep 2006
    Location
    S.Bucks / W.London UK
    Posts
    101

    installing XP in Acer Aspire one

    OK,

    What a job to locate Terminal.

    So that I do not mess it up again please confirm I change "0" for "5" ?

    I did the sudos & now boot-up only shows these:-

    0) Ubuntu Linux 3.0.0 generic
    1) -"- (recovery mode)
    2) Memory Test (memtest 86+)
    3) "-" "-" ser console 115200
    4) Wiondows Recovery Environmt (loader) (on/dev/sda1)
    5) MS Win. XO Home edition (on/dev/sda3)
    6) Linux Mint 11 Katya (11) (on/dev/sda5)

    I changed the 0 to 5 in grub but is read only & cannot save it.

    I read online about grub & seems very difficult to understand. How to go about it?
    Last edited by nichos; 10-04-2011 at 01:04 PM. Reason: edit grub
    Home build, Asus P5K Premium WiFiiFi Intel,
    Intel Core 2 Quad Pro Q6600 2.4GHz, OCZ Cpu Cooler,
    2x2GB, DDR2 800, GeForce 9800 GTX , Excelsior sata 250gb,
    OCZ 600W Psu, X45, XPpro sp3/Ubuntu 8.10

  6. #6
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    1,946
    If the information on menuentries you posted is accurate, then yes, change it to a 5. Your need root privileges to edit these files. Now that you have found the terminal, open it and type:

    sudo gedit /etc/default/grub
    You should be able to make the change and save it. Note at the top of that file you need to run update-grub after doing this. gedit is text editor. If you get an error because it is not available, you will have to find another which you should be able to do from the Main Menu.

    Editing this file is the recommended way. It would also work in the grub.cfg file but there are differences and I don't want to get into a convoluted explanation here so, just use the method above.

  7. #7
    Linux Newbie nichos's Avatar
    Join Date
    Sep 2006
    Location
    S.Bucks / W.London UK
    Posts
    101
    Thanx,

    when & where do I type "sudo gedit /etc/default/grub" & the update.

    Do I do first the change 0 to 5 first?

    Sorry beeing such an idiot.
    Home build, Asus P5K Premium WiFiiFi Intel,
    Intel Core 2 Quad Pro Q6600 2.4GHz, OCZ Cpu Cooler,
    2x2GB, DDR2 800, GeForce 9800 GTX , Excelsior sata 250gb,
    OCZ 600W Psu, X45, XPpro sp3/Ubuntu 8.10

  8. #8
    Linux Newbie nichos's Avatar
    Join Date
    Sep 2006
    Location
    S.Bucks / W.London UK
    Posts
    101
    Tried the sudo, grub came up, change3d to 5, clicked save, then tried sudo again & 5 was set, BUT said:-

    "......x@x-AOD255:~$ sudo gedit /etc/default/grub
    [sudo] password for x:

    (gedit:1743): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.6SME2V': No such file or directory

    (gedit:1743): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory....."

    And on boot-up nothing changed.

    Where/when do I do "updatr-grub"

    I did it in new Terminal & said this:-

    x@x-AOD255:~$ update-grub
    grub-mkconfig: You must run this as root
    Home build, Asus P5K Premium WiFiiFi Intel,
    Intel Core 2 Quad Pro Q6600 2.4GHz, OCZ Cpu Cooler,
    2x2GB, DDR2 800, GeForce 9800 GTX , Excelsior sata 250gb,
    OCZ 600W Psu, X45, XPpro sp3/Ubuntu 8.10

  9. #9
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    1,946
    I don't know what the Ubuntu 11.04 Desktop looks like as I have never used it but, on Ubuntu 10.10, there is an Applications tab and if you click it and mouse down over the options you will find Terminal. Click it to open it and type the commands there. You need to preface them with sudo as indicated. If that doesn't work and you are more comfortable using GUI, open the terminal and type:

    gksudo nautilus and it should open the file manager and you can then navigate to the /etc/default/grub file, make the changes and save.
    When you ran sudo gedit /etc/default/grub what happened? I'm not using Ubuntu now so can't test. You could just try sudo gedit and when gedit opens go to the File tab and click Open and navigate to that file.

    You need to put sudo in front of all the commands dealing with the bootloader, as in: sudo update-grub

  10. #10
    Linux Newbie nichos's Avatar
    Join Date
    Sep 2006
    Location
    S.Bucks / W.London UK
    Posts
    101
    As you can see from my last 2 post I managed to do all you asked me to, the "0" changed permanet to "5" but still get ubuntu as default.

    Maybe is because I do not understand when/where to do the "update-grub". After I did the change I clicked on the editor save button.

    What does it mean
    "x@x-AOD255:~$ update-grub
    grub-mkconfig: You must run this as root

    How do I do it in "root"
    Home build, Asus P5K Premium WiFiiFi Intel,
    Intel Core 2 Quad Pro Q6600 2.4GHz, OCZ Cpu Cooler,
    2x2GB, DDR2 800, GeForce 9800 GTX , Excelsior sata 250gb,
    OCZ 600W Psu, X45, XPpro sp3/Ubuntu 8.10

Page 1 of 2 1 2 LastLast

Posting Permissions

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