Change default OS in grub from within grub


Results 1 to 2 of 2

Thread: Change default OS in grub from within grub

  1. #1
    Join Date
    Nov 2002
    Location
    in my house.
    Posts
    114

    Change default OS in grub from within grub

    So I can't boot to a linux partition on my machine anymore and I just want to use windows and I'm too lazy to actually delete the partition and fix everything and I just want to make Windows my default OS on boot. I went into the grub commandline and changed the environment variable for "default" from 0 to 2 since windows is the 3rd entry, and then i did "save_env default" to try and save that variable. Unfortunately, upon reboot, the default variable has been set back to 0.

    How can I permanently change the default boot device from within the grub commandline?

    Thanks!
    -Glitch

    "The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes, that's it." - Linus Torvalds

    Registered linux user # 296563

  2. #2
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,951
    You have to change the Grub configuration file inside the Linux partition.

    (1) You can either get a driver (freeware) for Windows to mount the Linux partition so then you can edit the Grub configuration file within Windows.

    (2) Run any Linux Live CD and use it to mount the Linux partition for editing.

    (3) Restore the MS Windows boot loader in the MBR thereby nuking Grub. This will remove Grub in the MBR.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

Posting Permissions

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