PDA

View Full Version : gpart



sbininit
01-25-2010, 04:00 PM
I noticed there is no gpart in the new Knoppix 6.2 release. gpart was extremely useful to me a while back when I lost my partition table. I was able to use Knoppix 5.3.1 which already has gpart on it to recover my partition table and boot my computer again. Everything I own was on those partitions. I have it backed up on an external drive but still think of the aggravation.


I tryed installing from tar .gz file but after make is executed it comes back with many errors. Same thing goes for the Ubuntu live cd. Its no problem intalling it with synaptic to my HD Ubuntu install. If you cant boot the HD it does little good though. LOL

I'm loving 6.2

OErjan
01-26-2010, 05:39 PM
if you are online try typing


sudo apt-get install parted.

or even

sudo apt-get install gparted

that should sort the problem in short order

rusty
01-27-2010, 02:46 AM
I think he means gpart http://packages.debian.org/lenny/gpart
which available through apt as well. He could also download the package to portable media and install using dpkg.

sbininit
01-27-2010, 05:07 AM
I think he means gpart http://packages.debian.org/lenny/gpart
which available through apt as well. He could also download the package to portable media and install using dpkg.


I down loaded it from that actual site but I can't get it to install for some reason. when I cd into the folder and run make It comes back with a bunch of errors whick I have no clue how to decipher.



knoppix@Microknoppix:~/gpart01$ su
root@Microknoppix:/home/knoppix/gpart01# make
make -C src
make[1]: Entering directory `/home/knoppix/gpart01/src'
gcc -Wall -O2 -pedantic -DVERSION=\"0.1h\" -c -o gmodules.o gmodules.c
gmodules.c:21:19: error: /usr/include/dlfcn.h: Input/output error
gmodules.c: In function 'g_mod_delete':
gmodules.c:60: warning: implicit declaration of function 'dlclose'
gmodules.c: In function 'g_mod_addexternal':
gmodules.c:189: warning: implicit declaration of function 'dlopen'
gmodules.c:189: error: 'RTLD_NOW' undeclared (first use in this function)
gmodules.c:189: error: (Each undeclared identifier is reported only once
gmodules.c:189: error: for each function it appears in.)
gmodules.c:189: warning: assignment makes pointer from integer without a cast
gmodules.c:190: warning: implicit declaration of function 'dlerror'
gmodules.c:193: warning: implicit declaration of function 'dlsym'
make[1]: *** [gmodules.o] Error 1
make[1]: Leaving directory `/home/knoppix/gpart01/src'
make: *** [gpart] Error 2
root@Microknoppix:/home/knoppix/gpart01#



I followed the instuctions in the Install readme if I understand them correctly:


gpart Compilation and Installation


Up to now a configure script for gpart does not seem necessary,
it should compile under Linux and FreeBSD using GNU cc and GNU
make.

Steps to compile and install:

- change the installation directory prefix "prefix" in the
file "inst.defs". The default is "/usr/local".

- type "make".
- if no errors were encountered, type "make install".

It is a good idea to read the man page before starting to
play around.





I changed prefix to "prefix" perhaps this is incorrect

rusty
01-27-2010, 08:50 PM
If you downloaded the .deb you only need to use
dpkg -i gpart_0.1h-4.1_i386.deb , or if you have internet acces
aptitude update && aptitude install gpart Compilation isnt necessary.

sbininit
01-30-2010, 01:04 PM
If you downloaded the .deb you only need to use
dpkg -i gpart_0.1h-4.1_i386.deb , or if you have internet acces
aptitude update && aptitude install gpart Compilation isnt necessary.



Thanks for the suggestions but I cant seem to download a gpart .deb file anywhere for the first command and the second one yields these errors:


knoppix@Microknoppix:~$ su
root@Microknoppix:/home/knoppix#
root@Microknoppix:/home/knoppix# aptitude update && aptitude install gpart
Get:1 http://security.debian.org stable/updates Release.gpg [835B]
Get:2 http://security.debian.org testing/updates Release.gpg [835B]
Get:3 http://security.debian.org stable/updates Release [40.8kB]
Get:4 http://volatile.debian.org stable/volatile Release.gpg [189B]
Err http://debian-knoppix.alioth.debian.org ./ Release.gpg
Temporary failure resolving 'debian-knoppix.alioth.debian.org'
Get:5 http://volatile.debian.org stable/volatile Release [40.7kB]
Err http://ftp.de.debian.org stable Release.gpg
Temporary failure resolving 'ftp.de.debian.org'
Err http://x2go.obviously-nice.de lenny Release.gpg
Temporary failure resolving 'x2go.obviously-nice.de'
Get:6 http://security.debian.org testing/updates Release [44.6kB]
Ign http://security.debian.org stable/updates/main Packages/DiffIndex
Ign http://security.debian.org stable/updates/contrib Packages/DiffIndex
Ign http://security.debian.org stable/updates/non-free Packages/DiffIndex
Ign http://volatile.debian.org stable/volatile/main Packages/DiffIndex
Ign http://security.debian.org testing/updates/main Packages/DiffIndex
Ign http://security.debian.org testing/updates/contrib Packages/DiffIndex
Ign http://security.debian.org testing/updates/non-free Packages/DiffIndex
Get:7 http://security.debian.org stable/updates/main Packages [262kB]
Ign http://volatile.debian.org stable/volatile/contrib Packages/DiffIndex
Ign http://volatile.debian.org stable/volatile/non-free Packages/DiffIndex
Get:8 http://volatile.debian.org stable/volatile/main Packages [5483B]
Err http://ftp.de.debian.org testing Release.gpg
Temporary failure resolving 'ftp.de.debian.org'
Hit http://volatile.debian.org stable/volatile/contrib Packages
Hit http://volatile.debian.org stable/volatile/non-free Packages
Err http://ftp.de.debian.org unstable Release.gpg
Temporary failure resolving 'ftp.de.debian.org'
Hit http://security.debian.org stable/updates/contrib Packages
Hit http://security.debian.org stable/updates/non-free Packages
Hit http://security.debian.org testing/updates/main Packages
Hit http://security.debian.org testing/updates/contrib Packages
Hit http://security.debian.org testing/updates/non-free Packages
Err http://ftp.de.debian.org experimental Release.gpg
Temporary failure resolving 'ftp.de.debian.org'
Fetched 395kB in 1s (283kB/s)
Reading package lists... Done

Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information... Done
Initializing package states... Done
Reading task descriptions... Done
No candidate version found for gpart
No candidate version found for gpart
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information... Done
Initializing package states... Done
Reading task descriptions... Done

root@Microknoppix:/home/knoppix#

rusty
01-30-2010, 10:50 PM
Lets try it another way then. In a root terminal type:
wget http://ftp.us.debian.org/debian/pool/main/g/gpart/gpart_0.1h-4.1_i386.deb

and then
dpkg -i gpart_0.1h-4.1_i386.deb

OErjan
01-31-2010, 01:44 PM
another tool that can recovver lost partitions and the like is testdisk by the way

sbininit
01-31-2010, 02:37 PM
another tool that can recovver lost partitions and the like is testdisk by the way


testdisk agravates me though. Once you wait on it to scan for an hour then you get to a place where you cant go back and have to do it all over again. I haven't found a way back from that point if there is one.

sbininit
01-31-2010, 02:41 PM
Lets try it another way then. In a root terminal type:
wget http://ftp.us.debian.org/debian/pool/main/g/gpart/gpart_0.1h-4.1_i386.deb

and then
dpkg -i gpart_0.1h-4.1_i386.deb


Thanks I couldn't get it with wget for some reason-


root@Microknoppix:/home/knoppix# wget http//ftp.us.debian.org/debian/pool/main/g/gpart/gpart_0.1h-4.1_i386.deb
--2010-01-31 08:38:59-- http://http//ftp.us.debian.org/debian/pool/main/g/gpart/gpart_0.1h-4.1_i386.deb
Resolving http... failed: Name or service not known.
wget: unable to resolve host address `http'
root@Microknoppix:/home/knoppix#



but I manually found found the .deb and opened it with debi package installer and now it works.

OErjan
02-04-2010, 02:05 PM
i do not quite "trust" gpart, mainly cause of the tendency to make wrong diagnosis of large disk geometries, it is slightly unstable above 1024 cylinders (which is quite common today)

Capricorny
02-04-2010, 10:49 PM
I had a suspicion, and tried the address given here, w/o the http:// prefix:


root@Microknoppix:/home/knoppix# wget ftp.us.debian.org/debian/pool/main/g/gpart/gpart_0.1h-4.1_i386.deb
--2010-02-04 22:48:15-- http://ftp.us.debian.org/debian/pool/main/g/gpart/gpart_0.1h-4.1_i386.deb
Resolving ftp.us.debian.org... 35.9.37.225, 64.50.236.52, 128.30.2.36, ...
Connecting to ftp.us.debian.org|35.9.37.225|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 36310 (35K) [application/octet-stream]
Saving to: `gpart_0.1h-4.1_i386.deb'

100%[======================================>] 36,310 45.7K/s in 0.8s

2010-02-04 22:48:16 (45.7 KB/s) - `gpart_0.1h-4.1_i386.deb' saved [36310/36310]



So, nothing wrong with the advice, really. And wget is your friend.
:wink:

sbininit
02-05-2010, 02:50 AM
i do not quite "trust" gpart, mainly cause of the tendency to make wrong diagnosis of large disk geometries, it is slightly unstable above 1024 cylinders (which is quite common today)


Is there a better way to recover the partition table? gpart rocked for me on that particular occasion. It might not the next time around. Maybe thats why it isn't included on Knoppix6.2.

OErjan
02-05-2010, 01:51 PM
sadly every tool has it's limits, to eliminate errors I use several to get all information I can on the disk first
smartmontools
fdisk
sfdisk
testdisk

also I frequently use ddrescue and regular dd with flags conv=noerror,sync to "save" images of drives, it takes forever on large disks but it can save me in long run.
also I frequently use gzip to compress the image.

dd if=/dev/sdaX conv=noerror,sync | gzip -9 > /dev/sdbY/image.gz

sometimes I have used hex-edit to "rescue" important documents form such drive-images of damaged disks, it can be, uhm challenging but beter than total loss.
this is a jungle, I have been called by friends and friends of friends... to rescue "crashed" computers for two decades+ and I have only scratched the surface over that time, i have no banks of circuitboards from HDD's (ok a few), no clean rooms... i just try as best i can, if i see i can not do anything i say so and inform them about the more competent alternatives, sadly those come at a cost, some opt for that others not.

sbininit
02-06-2010, 03:28 PM
sadly every tool has it's limits, to eliminate errors I use several to get all information I can on the disk first
smartmontools
fdisk
sfdisk
testdisk

also I frequently use ddrescue and regular dd with flags conv=noerror,sync to "save" images of drives, it takes forever on large disks but it can save me in long run.
also I frequently use gzip to compress the image.

dd if=/dev/sdaX conv=noerror,sync | gzip -9 > /dev/sdbY/image.gz

sometimes I have used hex-edit to "rescue" important documents form such drive-images of damaged disks, it can be, uhm challenging but beter than total loss.
this is a jungle, I have been called by friends and friends of friends... to rescue "crashed" computers for two decades+ and I have only scratched the surface over that time, i have no banks of circuitboards from HDD's (ok a few), no clean rooms... i just try as best i can, if i see i can not do anything i say so and inform them about the more competent alternatives, sadly those come at a cost, some opt for that others not.


Will dd work when you cant actually see that the hard drive exists with fdisk, df, or blkid?

krishna.murphy
02-07-2010, 04:22 PM
Lets try it another way then. In a root terminal type:
wget http://ftp.us.debian.org/debian/pool/main/g/gpart/gpart_0.1h-4.1_i386.deb

and then
dpkg -i gpart_0.1h-4.1_i386.deb


Thanks I couldn't get it with wget for some reason-


root@Microknoppix:/home/knoppix# wget http//ftp.us.debian.org/debian/pool/main/g/gpart/gpart_0.1h-4.1_i386.deb
--2010-01-31 08:38:59-- http://http//ftp.us.debian.org/debian/pool/main/g/gpart/gpart_0.1h-4.1_i386.deb
Resolving http... failed: Name or service not known.
wget: unable to resolve host address `http'
root@Microknoppix:/home/knoppix#


but I manually found found the .deb and opened it with debi package installer and now it works.

Hey-

note the extra http here: http://http//ftp.us.debian.org/ - happens all the time, IMHO

-Krishna :(