LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-08-2012, 10:09 AM   #1
surlogics
LQ Newbie
 
Registered: Sep 2012
Posts: 4

Rep: Reputation: Disabled
Emergency:Misused mke2fs and cannot boot into system


I installed ubuntu with wubi in windows7 64bit, and I had installed Mandriva 2011 with a disk. I tried to learn linux with Ubuntu and misused mke2fs; after I reboot my computer, windows7 and ubuntu has crashed.
I think I may used the following command

Code:
mke2fs -j -L "logical"/dev/sda2
As I have mandriva, I boot into mandriva and found
Code:
   # df -h

    /dev/sda7 12G 9.8G 1.5G 88% /
    /dev/sda2 15G 165M 14G 2% /media/logical
    /dev/sda6 119G 88G 32G 74% /media/2C9E85319E84F51C
    /dev/sda5 118G 59G 60G 50% /media/D25A6DDE5A6DBFB9
    /dev/sda9 100G 188M 100G 1% /media/ae69134a-a65e-488f-ae7f-150d1b5e36a6
    /dev/sda1 100M 122K 100M 1% /media/DELLUTILITY
    /dev/sda3 98G 81G 17G 83% /media/OS


    # fdisk /dev/sda
    Command (m for help): p
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xd24f801e

    Device Boot Start End Blocks Id System
    /dev/sda1 2048 206847 102400 6 FAT16
    /dev/sda2 * 206848 30926847 15360000 7 HPFS/NTFS/exFAT
    /dev/sda3 30926848 235726847 102400000 7 HPFS/NTFS/exFAT
    /dev/sda4 235728864 976771071 370521104 f W95 Ext'd (LBA)
    /dev/sda5 235728896 481488895 122880000 7 HPFS/NTFS/exFAT
    /dev/sda6 727252992 976771071 124759040 7 HPFS/NTFS/exFAT
    /dev/sda7 481500243 506674034 12586896 83 Linux
    /dev/sda8 506674098 514851119 4088511 82 Linux swap / Solaris
    /dev/sda9 514851183 727246484 106197651 83 Linux

    Partition table entries are not in disk order
but I had forgotten what kind of partition it was before I transfered it into ext3
Data was not lost, and I can view my files as I could in Windows In Mandriva, there are following disks; 117.2G hard disk, files in it is the same as my Windows D:, and ubuntu was installed in it;119.0G hard disk is my G:, with my personal files in it;12.0G is the same with mandriva / (with means root), 101.3G hard disk with nothing but lost+found;DELLUTILITY should be Dell computer utilities preinstalled in my computer ;logical is the disk which I had spoiled;and OS is the C: in my Windows.
After I boot, grub let me choose Mandriva or Windows. I chose windows and it tells me:FILE system type unknown, partition type 0x7 Error 13: Invalid or unsupported executable format I doubt something wrong with ubuntu grub
Code:
    # cat /boot/grub/menu.lst
    timeout 5
    color black/cyan yellow/cyan
    gfxmenu (hd0,6)/boot/gfxmenu
    default 0

    title linux
    kernel (hd0,6)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=199581b7-ac7e-4c5f-9888-24c4f213cad8 nokmsboot logo.nologo quiet resume=UUID=34c546e4-9c42-4526-aa64-bbdc0e9d64fd splash=silent vga=788
    initrd (hd0,6)/boot/initrd.img

    title linux-nonfb
    kernel (hd0,6)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=199581b7-ac7e-4c5f-9888-24c4f213cad8 nokmsboot resume=UUID=34c546e4-9c42-4526-aa64-bbdc0e9d64fd
    initrd (hd0,6)/boot/initrd.img

    title failsafe
    kernel (hd0,6)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=199581b7-ac7e-4c5f-9888-24c4f213cad8 nokmsboot failsafe
    initrd (hd0,6)/boot/initrd.img

    title windows
    root (hd0,1)
    makeactive
    chainloader +1
I can boot into linux, but not ubuntu, it boot into Mandriva
I dont have a boot disk
Help me find a way to make it work again, Thanks in advance.
 
Old 09-08-2012, 09:24 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,840

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
Quote:
root (hd0,1)
That says the partition you trashed was the Win7 boot partition. Contains principally the BCD.
Would have been NTFS.
You will need a Win7 recovery disk to fix that.

It's possible the Dell Utility partition might fix it, but even if it does, it may also reformat the whole Win7 partition. Or maybe even the entire disk. I never use the vendor utilities until after I have rebuilt the system to how I want. To get Dell update utilities and the like - and always from a [C,D]VD.

Backups are useful too.
 
Old 09-08-2012, 11:10 PM   #3
surlogics
LQ Newbie
 
Registered: Sep 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks for your reply, I am wondering what should I do what kind of recovery disk I should use, is there any reliable source available for download? Can I do it in Mandriva Linux? Is there a tutorial; Thanks a lot syg00
 
Old 09-09-2012, 12:35 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,840

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
You need a Windows recovery disc - this can't be fixed from Linux.

Read this Microsoft article - note you need the RebuildBcd. I would reckon you'd need to reformat /dev/sda2 as NTFS first. It's possible this won't work unless you also replace the (Linux) MBR code by using the Bootrec.exe FixMBR subcommand as well. This will render your Linux (Mandy) unbootable - that will need to be rectified too (pretty easy).
Regardless, I expect your Ubuntu Wubi to be non-bootable - I don't have any experience with Wubi, so can't suggest a means of recovering that.

this LQ blog suggests you can get an evaluation copy of Win7 to do the recovery. Haven't tried it.

Quite a mess huh ?.
 
Old 09-09-2012, 03:48 AM   #5
surlogics
LQ Newbie
 
Registered: Sep 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you syg00, I download the iso file but no avaliable disk for burning
I had checked my harddisk with bootsector, and results are here: http://paste.ubuntu.com/1193796/
I hope what you told me would work.

Two more questions:
1 Kindly provide me the way to reformat /dev/sda2 as NTFS, I am really scared that wrong command could make things worse. Is it mkfs.ntfs
2 Since I probably can not boot into Mandriva after the recovery, what about the sector(s) in my hard disk where mandriva was installed? Is it formatted to NTFS as well; how can I utilize it?

and why sda2 is shown as NTFS in fdisk -l

Thanks a lot

Last edited by surlogics; 09-10-2012 at 02:39 AM.
 
Old 09-10-2012, 08:19 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,840

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
The partition type (as shown by fdisk -l) is different to the filesystem type (as determined by mkfs). The former is largely ignored. But not alas by the Windows installer/recovery.

Do a mkfs.ntfs on /dev/sda2, the try the rebuildbcd. If that fails, do the fixmbr, then retry the rebuildbcd. Should work, but it's been a while since I needed to recover a Windows system.

To get Mandy back bootable, see the doco - should be reasonably straight-forward from a liveCD/install CD/DVD. Been many years since I've bothered with Mandrake (as Mandy was known), but I'm sure they cover this.
 
Old 09-10-2012, 09:45 AM   #7
surlogics
LQ Newbie
 
Registered: Sep 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Sorry, Haven't done mkfs.ntfs before fixmbr. So I had installed a new version of windows. Fortunately no data loss.(I had done backup)

Thanks again and I am now know much more about harddisk partition than before.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB emergency boot CD for a x64bit dual boot chasfgr Linux - Newbie 5 08-17-2010 03:51 PM
2.3. Creating a File System on the Partition (Bedside mke2fs there is mkfs.ext2/3) johncsl82 Linux From Scratch 2 05-23-2010 05:15 AM
mke2fs -t vfat created an ext2 file system catkin Slackware 7 03-23-2010 08:58 AM
HELP ! Emergency Filse System ERRORS! ClericPreston Linux - Newbie 1 10-03-2004 01:08 PM
HELP ! Emergency Filse System ERRORS! ClericPreston Linux - General 1 09-04-2004 11:57 AM


All times are GMT -5. The time now is 11:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration