Re: Help really needed: Formatted / partition by accident.

2006-06-01 Thread Dmitri Minaev

On 6/2/06, nick lidakis <[EMAIL PROTECTED]> wrote:

Tried booting after recovering  but no luck.  Maybe I need to reinstall
grub?


In my case, TestDisk renumbered the partitions, so I had to edit
/boot/grub/menu.lst and /etc/fstab accordingly. Compare the actual
partition numbers with those shown in your configuration files.

--
With best regards,
Dmitri Minaev


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Help really needed: Formatted / partition by accident.

2006-06-01 Thread nick lidakis

Dmitri Minaev wrote:

I am afraid that nothing can be done to recover this installation. You
still can try to recover some of your data. If your partition table is
damaged, you may find TestDisk useful. See:
http://www.cgsecurity.org/wiki/TestDisk

TestDisk has helped me to recover my data when I occasionally dd'ed a
floppy image onto /dev/hda.

OK, TestDisk was able to recover all three partitions. /, swap & home. 
Really amazing free (he's getting a donation for sure) software. As a 
backup measure I copied all of home to an external hard disk.  Cfdisk 
shows (just to double check, didn't write anything) / as bootable, the 
swap and home partitions.


Tried booting after recovering  but no luck.  Maybe I need to reinstall 
grub? 


Thanks for all the help and suggestions. Really appreciated.

Nick


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Help really needed: Formatted / partition by accident.

2006-05-29 Thread Dmitri Minaev

I am afraid that nothing can be done to recover this installation. You
still can try to recover some of your data. If your partition table is
damaged, you may find TestDisk useful. See:
http://www.cgsecurity.org/wiki/TestDisk

TestDisk has helped me to recover my data when I occasionally dd'ed a
floppy image onto /dev/hda.

--
With best regards,
Dmitri Minaev


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]





Re: Help really needed: Formatted / partition by accident.

2006-05-29 Thread Hex Star
On 5/29/06, Christopher Nelson <[EMAIL PROTECTED]> wrote:
On Mon, May 29, 2006 at 04:22:29PM -0400, nick lidakis wrote:> Kilian wrote:  [snip details of recovering system]> >That should be it. You'll lose your old root-partition (which you> >already did, I think, by installing monowall on /dev/sda1) and your
> >old /usr partition. You should be able to keep /home.> >> >If there's anything important on /usr, you can of course save that as> >you can still access this partition with the rescue cd.
> >> >>Any help at all would be appreciated!> >> >HTH> >> >-- Kilian> >> >> I think I lost everything. When I cfdisk /dev/sda in and ubuntu live cd
> there is only one partition labeled as FreeBSD (monowall is based on> frebsd) filesystem. The rest of this disk is labeled as free space.don't despair just yet.  It was mentioned earlier that parted can
recover data on partitions (I've not used it, so don't ask me how) --and if you have an Ubuntu CD you can issue 'apt-get install parted' andthen do a 'man parted' and read docs in '/usr/share/doc/parted' to
figure out how to use it.--Christopher Nelson -- [EMAIL PROTECTED]---"Neighbors!!  We got neighbors!  We ain't supposed to have any neighbors, and
I just had to shoot one."   -- Post Bros. Comics--To UNSUBSCRIBE, email to [EMAIL PROTECTED]with a subject of "unsubscribe". Trouble? Contact 
[EMAIL PROTECTED]The rescue command in parted seems to be what you're looking for, info on its usage can be found here: 
http://www.gnu.org/software/parted/manual/html_chapter/parted_2.html#SEC24 :)


Re: Help really needed: Formatted / partition by accident.

2006-05-29 Thread Christopher Nelson
On Mon, May 29, 2006 at 04:22:29PM -0400, nick lidakis wrote:
> Kilian wrote:
  [snip details of recovering system]
> >That should be it. You'll lose your old root-partition (which you 
> >already did, I think, by installing monowall on /dev/sda1) and your 
> >old /usr partition. You should be able to keep /home.
> >
> >If there's anything important on /usr, you can of course save that as 
> >you can still access this partition with the rescue cd.
> >
> >>Any help at all would be appreciated!
> >
> >HTH
> >
> >-- Kilian
> >
> >
> I think I lost everything. When I cfdisk /dev/sda in and ubuntu live cd 
> there is only one partition labeled as FreeBSD (monowall is based on 
> frebsd) filesystem. The rest of this disk is labeled as free space.

don't despair just yet.  It was mentioned earlier that parted can
recover data on partitions (I've not used it, so don't ask me how) --
and if you have an Ubuntu CD you can issue 'apt-get install parted' and
then do a 'man parted' and read docs in '/usr/share/doc/parted' to
figure out how to use it.

-- 
Christopher Nelson -- [EMAIL PROTECTED]
---
"Neighbors!!  We got neighbors!  We ain't supposed to have any neighbors, and
I just had to shoot one."   -- Post Bros. Comics


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Help really needed: Formatted / partition by accident.

2006-05-29 Thread nick lidakis

Kilian wrote:

nick lidakis wrote:
I was having trouble with my monowall  router running off a compact 
flash. I decide to reinstall the monowall boot image onto the CF 
card. In the process I must have mistyped and accidentally wrote the 
image to my boot partition i.e. /dev/sda1. The machine now boots into 
monowall instead of Grub.


Using Google, I can only find articles or HOWTO's on recovering a 
corrupt or overwritten master boot record.


It sounds as if you have created a new filesystem on /dev/sda1 which 
used to be your root partition, so it's not only an issue with the 
MBR. For the rest of my answer, I am assuming this.


> When I did the initial
installation with the latest the net install cd I chose the default 
desktop partition scheme, which I believe (if I am not mistaken) was 
/, /usr, and a home partitions. / would have my kernels, root 
directory and grub.


So my question is, how do I proceed? I can use a rescue CD to boot 
into the system and mount /, but how would I reinstall what would 
normally be in /? Do I do a reinstall and skip formatting / home?


You could boot from the rescue CD (assuming it's a Debian one) and 
mount /dev/sda1 to, say, /mnt/sda1. Then you do 'debootstrap 
/mnt/sda1' which will install a Debian System on /mnt/sda1 (your / 
partition), then chroot into /mnt/sda1, adjusting your bootloader 
config and run the bootloader to install the MBR.


Of course you can keep your /home - just mount it into the new system. 
With the partition used as /usr it's going to be a bit more difficult 
as  it contains system files from your old installation; if you can, 
wipe it out and use it as /usr in your new system. So basically you'd 
do (from the rescue system):


 $ mkdir -p /mnt/sda1

 $ mkfs -t ext3 /dev/sda1  # this will destroy your monowall
   # installation

 $ mount /dev/sda1 /mnt/sda1

 $ mkdir /mnt/sda1/home

 $ mount /dev/sdaX /mnt/sda1/home  # sdaX is the partition where /home
   # resides

 $ mkfs -t ext3 /dev/sdaY   # sdaY is the partition used as /usr
# everything that used to be on /usr will
# be destroyed

 $ mkdir /mnt/sda1/usr

 $ mount /dev/sdaY /mnt/sda1/usr

 $ debootstrap /mnt/sda1

 $ chroot /mnt/sda1

 [configure your bootloader]

 [run bootloader]

 [adjust fstab]:
   /dev/sda1   / ext3   defaults0   0
   /dev/sdaX   /home ext3   defaults0   0
   /dev/sdaY   /usr  ext3   defaults0   0
   /dev/sdaZ   none  swap   sw  0   0
   proc/proc proc   defaults0   0

 $ exit

 $ reboot

That should be it. You'll lose your old root-partition (which you 
already did, I think, by installing monowall on /dev/sda1) and your 
old /usr partition. You should be able to keep /home.


If there's anything important on /usr, you can of course save that as 
you can still access this partition with the rescue cd.



Any help at all would be appreciated!


HTH

-- Kilian


I think I lost everything. When I cfdisk /dev/sda in and ubuntu live cd 
there is only one partition labeled as FreeBSD (monowall is based on 
frebsd) filesystem. The rest of this disk is labeled as free space.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Help really needed: Formatted / partition by accident.

2006-05-29 Thread Kilian

nick lidakis wrote:
I was having trouble with my monowall  router running off a compact 
flash. I decide to reinstall the monowall boot image onto the CF card. 
In the process I must have mistyped and accidentally wrote the image to 
my boot partition i.e. /dev/sda1. The machine now boots into monowall 
instead of Grub.


Using Google, I can only find articles or HOWTO's on recovering a 
corrupt or overwritten master boot record.


It sounds as if you have created a new filesystem on /dev/sda1 which 
used to be your root partition, so it's not only an issue with the MBR. 
For the rest of my answer, I am assuming this.


> When I did the initial
installation with the latest the net install cd I chose the default 
desktop partition scheme, which I believe (if I am not mistaken) was /, 
/usr, and a home partitions. / would have my kernels, root directory and 
grub.


So my question is, how do I proceed? I can use a rescue CD to boot into 
the system and mount /, but how would I reinstall what would normally be 
in /? Do I do a reinstall and skip formatting / home?


You could boot from the rescue CD (assuming it's a Debian one) and mount 
/dev/sda1 to, say, /mnt/sda1. Then you do 'debootstrap /mnt/sda1' which 
will install a Debian System on /mnt/sda1 (your / partition), then 
chroot into /mnt/sda1, adjusting your bootloader config and run the 
bootloader to install the MBR.


Of course you can keep your /home - just mount it into the new system. 
With the partition used as /usr it's going to be a bit more difficult as 
 it contains system files from your old installation; if you can, wipe 
it out and use it as /usr in your new system. So basically you'd do 
(from the rescue system):


 $ mkdir -p /mnt/sda1

 $ mkfs -t ext3 /dev/sda1  # this will destroy your monowall
   # installation

 $ mount /dev/sda1 /mnt/sda1

 $ mkdir /mnt/sda1/home

 $ mount /dev/sdaX /mnt/sda1/home  # sdaX is the partition where /home
   # resides

 $ mkfs -t ext3 /dev/sdaY   # sdaY is the partition used as /usr
# everything that used to be on /usr will
# be destroyed

 $ mkdir /mnt/sda1/usr

 $ mount /dev/sdaY /mnt/sda1/usr

 $ debootstrap /mnt/sda1

 $ chroot /mnt/sda1

 [configure your bootloader]

 [run bootloader]

 [adjust fstab]:
   /dev/sda1   / ext3   defaults0   0
   /dev/sdaX   /home ext3   defaults0   0
   /dev/sdaY   /usr  ext3   defaults0   0
   /dev/sdaZ   none  swap   sw  0   0
   proc/proc proc   defaults0   0

 $ exit

 $ reboot

That should be it. You'll lose your old root-partition (which you 
already did, I think, by installing monowall on /dev/sda1) and your old 
/usr partition. You should be able to keep /home.


If there's anything important on /usr, you can of course save that as 
you can still access this partition with the rescue cd.



Any help at all would be appreciated!


HTH

-- Kilian


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Help really needed: Formatted / partition by accident.

2006-05-29 Thread Roberto C. Sanchez
nick lidakis wrote:
> I was having trouble with my monowall  router running off a compact
> flash. I decide to reinstall the monowall boot image onto the CF card.
> In the process I must have mistyped and accidentally wrote the image to
> my boot partition i.e. /dev/sda1. The machine now boots into monowall
> instead of Grub.
> 
> Using Google, I can only find articles or HOWTO's on recovering a
> corrupt or overwritten master boot record. When I did the initial
> installation with the latest the net install cd I chose the default
> desktop partition scheme, which I believe (if I am not mistaken) was /,
> /usr, and a home partitions. / would have my kernels, root directory and
> grub.
> 
> So my question is, how do I proceed? I can use a rescue CD to boot into
> the system and mount /, but how would I reinstall what would normally be
> in /? Do I do a reinstall and skip formatting / home?
> 
> Any help at all would be appreciated!
> 
> 
Check out parted.  It can do partition rescues.

-Roberto

-- 
Roberto C. Sanchez
http://familiasanchez.net/~roberto


signature.asc
Description: OpenPGP digital signature


Help really needed: Formatted / partition by accident.

2006-05-29 Thread nick lidakis
I was having trouble with my monowall  router running off a compact 
flash. I decide to reinstall the monowall boot image onto the CF card. 
In the process I must have mistyped and accidentally wrote the image to 
my boot partition i.e. /dev/sda1. The machine now boots into monowall 
instead of Grub.


Using Google, I can only find articles or HOWTO's on recovering a 
corrupt or overwritten master boot record. When I did the initial 
installation with the latest the net install cd I chose the default 
desktop partition scheme, which I believe (if I am not mistaken) was /, 
/usr, and a home partitions. / would have my kernels, root directory and 
grub.


So my question is, how do I proceed? I can use a rescue CD to boot into 
the system and mount /, but how would I reinstall what would normally be 
in /? Do I do a reinstall and skip formatting / home?


Any help at all would be appreciated!


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]