A horror story with a potentially happy ending.
J.Markoll
j.markoll at free.fr
Sun Jan 1 08:29:24 UTC 2006
Hello,
I recently decided to torture my partitions on the laptop, in order to
experiment such things, and as I was quite in a good mood, I started
playing with partition magic (the other partition magic, the Norton
version) after I drunk a few glasses of wine. I could not see very
clearly what I was doing, so I didn't notice if I was manipulating
precisely the partition I wanted to, but it ended not so bad : I could
reboot, but surprise when I tried to look at the partition with the
'cfdisk' tool using the command line 'cfdisk /dev/hda' I could see
nothing, and console returned back 'partition number 6 is covered with
another' or something like that (in french: "chevauchement" : someone to
translate please ? :) ... )
I tried to use diverse other tools, Qparted, from Knoppix 4.2 and other
supports where Qparted is installed, but it refused to make the resize
menu active, so I had to forget it. I tried to understand how partman
fonctions, (command line) but I'm still a small newbie and I had to
forget it.
You know now how we can feel when the world of datas and configurations
we made are sinking deep in the unknow. A sensation that the ground is
not quite strong under the feet anymore ;)
So I did a careful picking up of the informations about the partitions
that I could get with the commands 'sudo fdisk -l' and the command 'df
-h' in order to have them at hand during the operations I was viewing to
realise, and I took out by best install CD... not to reinstall, but to
make use of the wonderful tools which are in there : Partman and
Ntfsresize. So I resized the Ntfs partition with ntfsresize in the Ash
shell, then went in the expert mode partitioning menu, and formatted the
swap partition in order to release the partition number 6 that had been
overwritten on one edge, plus did all the modifications I wanted to,
with Partman.
What I didn't know at this moment was how to quit the install elegantly
before the end, but I found out that after the partitioning, I just had
to insist on refusing to pursue and could ignore the warning pages in
red colors.
When I rebooted, I invoqued 'cfdisk /dev/hda' as root, and this time I
could see the new partitions I had created and no more 'fatal error'
message coming.
Incase you accidently erase Grub from the MBR, you can restore it with
the command line 'grub-install' from within the live CD : for that you
need to see (sudo fdisk -l) your partitions, then mount the root
partition of your Linux installation, then chroot the /mnt directory.
When done, 'grub install' (or grub-install ? someone to correct please
?) will do the job.
Reboot, go to /boot/grub/menu.lst file and add your Windows OS if you
have still one, following the example that's given in the commented
lines in the first part of the file.
Happy New Year, Joyce Markoll.
Michael Richter a écrit :
> So, I use PartitionMagic 8.0 to move a few things around for the
> ever-expanding Ubuntu portion of my hard disk. Then the god-awful happens:
> in the middle of applying my changes, Partition magic gives one of its
> ever-helpful error messages ("Error #705 applying changes.") and stops.
> Since what I was doing was a minor change (blowing away a swap partition to
> ready myself for some reshuffling), I didn't panic the way I should have.
>
> Whatever error #705 was (if that was indeed the number), it should have been
> more explicit. It should have read "Error #705: you are royally screwed!".
> Because when I finished my Windows session and went to move back to my
> Ubuntu side, GRUB had an effing conniption and... I had no drive.
>
> Now since I am primarily a Windows user (and all my software and work sits
> under Windows as a result), my natural reflex was to pull out my Windows
> recovery disk to see what I could do. What a damned joke. Apparently, to
> Sony, "recovery" means "erase everything on the whole disk and put back in
> the vanilla install". There was no option of any kind to try and restore
> the MBR or any such thing. Just a snide "it is advised to back up your
> critical data before proceeding"-style message. Bastards!
>
> Luckily I have Ubuntu. And, more specifically, I have my Ubuntu LiveCD.
> Which I booted and fired up GParted in. To see that I have.... no
> partitions. Time to go hunting.
>
> Having a fully-functional system despite not having a functional hard drive
> has its advantages. Sure it may be slow as all Hell on a CD, but it works.
> And it lets me surf the net to find possible solutions before giving up and
> losing literally years of data. Ordinarily I'd have to go to another
> computer (say in my classroom) to research solutions and download things and
> even mess with the hard drive (after removing it), but the Ubuntu LiveCD
> rendered that unnecessary. On the same crippled machine I could do whatever
> I needed to do.
>
> Well, a bit of research later, I got gpart and a few other similar tools.
> Of those, gpart was the most useful. It found my partitions and even
> restored them. But for a slight hurdle: it couldn't find my extended
> partition, so all my logical partitions were elevated to primaries. All
> four of them. Plus my Windows partition. You can see the problem.... So
> while all the partitions were found, only four of them could be saved.
>
> Luckily one of them was my swap partition. I could lose that for a while.
> So I restored the four partitions holding data and rebooted.
>
> GRUB still had a conniption.
>
> Of course that was to be expected in lovely hindsight. /dev/hda5 was the
> partition with /boot on it before the disaster and now it's /dev/hda2. I
> tried a few dead-end approaches (including an attempt to hand-patch the GRUB
> stage 1 and 1.5 levels because I just COULD NOT convert these primaries to
> logicals!) but they were fruitless. A total waste of time and energy. So I
> went to bed. (4AM by this point.) Next morning I had my epiphany: I had an
> external USB drive with stuff I was meaning to turf for a long time on it,
> so I did. I made it a 40GB ext3fs drive instead and went to work. Into the
> shell I went and mounted the three Linux partitions with data. Then I
> tar/bzip2ed the data from each one onto the external drive. I used GParted
> to make the old partition setup again (extended plus four logical) and just
> untarred the files back into the appropriate partitions. A quick reboot and
> try again.
>
> It still failed. But at least the error message was different. #15
> (couldn't find file) instead of #22 (couldn't find partition). Back to the
> LiveCD and back to the net to figure out how to bring GRUB back to life.
>
> A brief aside: GRUB is a great piece of software with really crappy
> documentation full of jargon with little cross-referencing.
>
> Anyway, this was proving fruitless and basically beyond me. I just don't
> think the UNIX way -- and have no desire to start. (I'm more a devotee of
> the Stanford school of thought
> <http://www.jwz.org/doc/worse-is-better.html>than of the New Jersey
> school of thought, this despite my distaste for
> Lisp.) So I did what any sleep-and-caffeine-deprived moron would think of
> after nearly 20 hours of working on a problem like this: I put in the Ubuntu
> install CD and let it, through some judicious work, bypass the installation
> of actual packages and repair GRUB for me.
>
> So here's where things stand now. GRUB is saved. Ubuntu works (with a few
> annoying glitches -- I may just reinstall the system and restore my /home,
> taking the opportunity afforded to modify my partitioning scheme or even
> play with LVM/EVMS for fun). Windows is deader than disco -- it won't boot
> without a BSOD and the BSOD vanishes before I can even read it only to
> reboot again. And again. And again. I have some ideas for recovering it
> that would make a grown man cry, but ... here's the thing. I may not do it.
>
> Oh, let's face it I probably will. I'll do Sony's version of "recovery",
> restore my vital data (which is sitting on that handy external disk -- the
> partition can't be booted, but it reads just fine!), and then uninstall
> everything under Windows but for the few applications left which don't have
> a suitable Linux alternative. (That list shrinks regularly and consists now
> of mostly games.) I'll wind up with 5-10GB devoted to Windows and 30GB
> devoted to Linux. And Linux -- Ubuntu -- will be the OS I use most of the
> time now.
>
> And all this because PartitionMagic decided to be actively user-hostile.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060101/8012cd70/attachment.sig>
More information about the ubuntu-users
mailing list