Accidental Partition Deleted: Can I default boot to WINDOWS

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
cabrego

Accidental Partition Deleted: Can I default boot to WINDOWS

Post by cabrego »

Hi all,

I have Mint8 and WinXpHome installed in my Asus 10005 HA netbook. I somehow managed to delete my partition that I believe Mint was installed on. Now on start up I am getting a Grub error saying the partition not found and I can only type shell commands in the window. I can boot from my USB and run a live version of Mint8 fine. Is it possible to modify my system to boot from my WinXpHome partition, since that seems to still be intact? Basically, I am asking if I can bypass the linux booter during a live session of mint8, so windows loads automatically.


any other suggestions?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mick55

Re: Accidental Partition Deleted: Can I default boot to WIND

Post by mick55 »

The normal procdeure is to use the Windows CD to restore the MBR.
If you do not have access to the Windows CD, the following commands will rewrite the MBR,
removing Grub and allowing the system to boot directly into Windows.

Boot the Mint LiveCD, open a terminal (Menu, Terminal) and enter the following commands.
Make sure you correctly identify the Windows device (normally sda):

Code: Select all

sudo apt-get install lilo

Code: Select all

sudo lilo -M /dev/sda mbr
Then remove the Mint Cd and reboot into Windows.
cabrego

Re: Accidental Partition Deleted: Can I default boot to WIND

Post by cabrego »

mick55 wrote:The normal procdeure is to use the Windows CD to restore the MBR.
If you do not have access to the Windows CD, the following commands will rewrite the MBR,
removing Grub and allowing the system to boot directly into Windows.

Boot the Mint LiveCD, open a terminal (Menu, Terminal) and enter the following commands.
Make sure you correctly identify the Windows device (normally sda):

Code: Select all

sudo apt-get install lilo

Code: Select all

sudo lilo -M /dev/sda mbr
Then remove the Mint Cd and reboot into Windows.
Thanks! This is the type of help I have been looking for. Since I am using a netbook, I do not have a cd rom. There is suppose to be a restoration partition with XP on it, but I can not figure out how to boot to it. I figured this might be simplier to do. I will let you know how it works. I believe Xp home is on sda1 (ntfs) on my system but I will double check..
cabrego

Re: Accidental Partition Deleted: Can I default boot to WIND

Post by cabrego »

mick55 wrote:

Code: Select all

sudo apt-get install lilo

Code: Select all

sudo lilo -M /dev/sda mbr
Then remove the Mint Cd and reboot into Windows.

Ok I ran into a problem running the previous code:

The first step seems to run fine, I have say yes to a few menu items and everything seems fine. The second command gives me an error:

Fatal: /dev/sda1 is not a master device with a primary parition table


Not sure what to do now,
mick55

Re: Accidental Partition Deleted: Can I default boot to WIND

Post by mick55 »

We need to find out the nomenclature of your devices and then substitute
the correct name in place of "/dev/sda"

Running these commands will show you the device names assigned to your drives/partitions.

Code: Select all

sudo lshw -C disk

Code: Select all

sudo sfdisk -l
Copy/paste the outputs here if you require assistance interpreting their meaning.
markcynt

Re: Accidental Partition Deleted: Can I default boot to WIND

Post by markcynt »

cabrego wrote:
mick55 wrote:

Code: Select all

sudo apt-get install lilo

Code: Select all

sudo lilo -M /dev/sda mbr
Then remove the Mint Cd and reboot into Windows.

Ok I ran into a problem running the previous code:

The first step seems to run fine, I have say yes to a few menu items and everything seems fine. The second command gives me an error:

Fatal: /dev/sda1 is not a master device with a primary parition table


Not sure what to do now,
Why did you change the code?

You should input the commands exactly as mick55 wrote them.
mick55

Re: Accidental Partition Deleted: Can I default boot to WIND

Post by mick55 »

cabrego wrote:Fatal: /dev/sda1 is not a master device with a primary parition table
lilo has to be installed to the MBR.

Drives have MBR's --- partitions don't. :wink:

/dev/sda1 is a partition.

/dev/sda is a drive.


Hi markcynt

Thanks for pointing out he changed the code, I didn't notice originally. :)
User avatar
Midnighter
Level 6
Level 6
Posts: 1327
Joined: Tue May 22, 2007 1:52 pm
Location: Western Australia

Re: Accidental Partition Deleted: Can I default boot to WIND

Post by Midnighter »

Load up from livecd, install testdisk, run testdisk from terminal to try and recover lost partition. I've managed to recover a partition that was accidentally formatted to ntfs, and recovered everything, completely restored.
cabrego

Re: Accidental Partition Deleted: Can I default boot to WIND

Post by cabrego »

Hi all,

Thanks for the support! After my last post I soon realized that I should not have modified the original code. After typing in the second command correctly, I restarted the computer and Windows started up; Symantec Ghost also Started and asked me to back up my files before proceeding, I just hit OK because I didn't really care if I lost anything on this computer. Ghost seemed to have reimaged my machine, I am not exactly sure...but My system is basically back to factory settings which I am happy with!

Thanks!
Locked

Return to “Installation & Boot”