Debian This forum is for the discussion of Debian Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-31-2004, 07:24 PM
|
#1
|
Member
Registered: Aug 2004
Location: Rochester, NY
Distribution: Debian Sid
Posts: 59
Rep:
|
Accidentally deleted debian partition PLZ HELP
Sorry for the caps, but I was installing windows (need cygwin + vpn) and managed to disconnect the wrong hd before setup, I accidentally deleted the debian partition, but nothing was writtten to it. Is it possible to recover the partition? I'm going to google it, but I must restart first, to complete XP setup. Note that I do have a CD burner and will be able to burn ISOs shortly if there's a bootable linux that can do this. (e.g. Knoppix, though I'm not sure that it has the right software). Here's the system info: Debian Sid, ext3 file system, only one other partition on the drive, swap (at the end of the disk), Linux kernel 2.4.25, grub bootloader.
|
|
|
08-31-2004, 07:27 PM
|
#2
|
Member
Registered: Feb 2004
Location: Ottawa, Ontario, Can
Distribution: Slackware, ubuntu
Posts: 391
Rep:
|
How exactly did you delete it? I think your pretty much out of luck for an entire partition, especially on a linux file system, barring use of some sort of professional forensics tool.
Last edited by sh1ft; 08-31-2004 at 07:28 PM.
|
|
|
08-31-2004, 07:33 PM
|
#3
|
Member
Registered: Aug 2004
Location: Rochester, NY
Distribution: Debian Sid
Posts: 59
Original Poster
Rep:
|
deleted from partition table
I deleted it from the partition table (to be precise winxp setup deleted it) no formatting was done, no file writing was done, it's just been removed from the file system. Shouldn't the ext3 journal still be intact?
|
|
|
08-31-2004, 08:27 PM
|
#4
|
Member
Registered: Aug 2004
Location: Rochester, NY
Distribution: Debian Sid
Posts: 59
Original Poster
Rep:
|
it's there!
I used TestDisk to look for the partition and it found it! I don't think it can restore the disk, though, there must be a way to do this!
Does anyone know how? Is there a utility that can "undelete" an entry from the partition table? I still have space on my backup drive, if I need to install another debian to restore my main one I will.
|
|
|
08-31-2004, 08:42 PM
|
#5
|
Member
Registered: Aug 2004
Location: Rochester, NY
Distribution: Debian Sid
Posts: 59
Original Poster
Rep:
|
Need GRUB
Turns out TestDisk -can- restore ext3 partitions. I am now using an ext3 driver for winxp to view the contents of the partition from windows. The bootloader was overwritten, it was GRUB before, how do I restore it? I think I need to do something like this from a bootable linux cd.
chroot /dev/hda1
after that, what's the command to restore the MBR for GRUB?
|
|
|
08-31-2004, 09:34 PM
|
#6
|
Member
Registered: Feb 2004
Location: Ottawa, Ontario, Can
Distribution: Slackware, ubuntu
Posts: 391
Rep:
|
Good to here you've solved it. I don't use grub, but I think the command is grub-install /dev/hda (?)
All you have to do is boot to a bootable linux cd you don't need to chroot because the mbr is independant of partitions, as long as you select you proper HD.
|
|
|
08-31-2004, 09:39 PM
|
#7
|
Member
Registered: Aug 2004
Location: Rochester, NY
Distribution: Debian Sid
Posts: 59
Original Poster
Rep:
|
thanks
I'll try that tomorrow (taking a while to get Gnoppix, which will have the grub executable on it). Is there a way to make grub recognize WinXP? In debian setup it recognized my old Windoze (which managed to destroy itself shortly thereafter), can I rerun that to detect the new windoze? (BTW the old one was win98, so I don't think the current config will work).
|
|
|
09-01-2004, 10:09 PM
|
#8
|
Member
Registered: Aug 2004
Location: Rochester, NY
Distribution: Debian Sid
Posts: 59
Original Poster
Rep:
|
fixed
I am posting this from Debian, the system is working, the command I used to fix it was
Code:
grub-install --root-directory=/mnt/hda1 /dev/hda
this was after (of course) I mounted /dev/hda1.
Thanks for the tip. Now I need a bit more help, is there a way I can get grub to recognize XP (on /dev/hdb5 with MBR @ /dev/hdb). Also, how can I rebuild the list of drives in the "Computer" icon in gnome (uri = computer:///)?
|
|
|
All times are GMT -5. The time now is 02:41 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|