Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 24 Apr 2014, 23:35
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
TestDisk: Flash Drive="CHS and LBA don't match" [SOLVED]
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 6 of 11 [156 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 Next
Author Message
Karl Godt


Joined: 20 Jun 2010
Posts: 3861
Location: Kiel,Germany

PostPosted: Mon 11 Mar 2013, 12:09    Post subject:  

Quote:
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

# e2fsck -b 8193 /dev/sdb1
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: Bad magic number in super-block while trying to open /dev/sdb1


-b 8193 is from 1,44MB floppy disk drives times. If mkfs.ext2-4 is called without any inode or block or superblock parameters, the first backup of the superblock is written to -b 32768.

To determine the backup superblocks you can use
Code:
dumpe2fs /dev/sdaX | grep -i backup

I get for example :
Quote:
bash-3.00# dumpe2fs /dev/sda2 | grep -i backup
dumpe2fs 1.41.11 (14-Mar-2010)
Journal backup: inode blocks
Backup superblock at 32768, Group descriptors at 32769-32771
Backup superblock at 98304, Group descriptors at 98305-98307
Backup superblock at 163840, Group descriptors at 163841-163843
Backup superblock at 229376, Group descriptors at 229377-229379
Backup superblock at 294912, Group descriptors at 294913-294915
Backup superblock at 819200, Group descriptors at 819201-819203
Backup superblock at 884736, Group descriptors at 884737-884739
Backup superblock at 1605632, Group descriptors at 1605633-1605635
Backup superblock at 2654208, Group descriptors at 2654209-2654211
Backup superblock at 4096000, Group descriptors at 4096001-4096003
Backup superblock at 7962624, Group descriptors at 7962625-7962627
Backup superblock at 11239424, Group descriptors at 11239425-11239427



man mke2fs :
Quote:

-S Write superblock and group descriptors only. This is useful if
all of the superblock and backup superblocks are corrupted, and
a last-ditch recovery method is desired
. It causes mke2fs to
reinitialize the superblock and group descriptors, while not
touching the inode table and the block and inode bitmaps. The
e2fsck program should be run immediately after this option is
used, and there is no guarantee that any data will be salvage-
able. It is critical to specify the correct filesystem block-
size when using this option, or there is no chance of recovery.

_________________
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal Razz
Back to top
View user's profile Send private message Visit poster's website 
Sylvander

Joined: 15 Dec 2008
Posts: 3263
Location: West Lothian, Scotland, UK

PostPosted: Mon 11 Mar 2013, 12:35    Post subject:  

I have little to no understanding of all of this stuff.

Could you give explicit instructions as to what I aught to do?
And explanations needed to give me essential understanding needed to get it right?
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2173

PostPosted: Mon 11 Mar 2013, 12:55    Post subject:  

I'm still wondering if you ever really formatted the drive or only set the partition type?
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3861
Location: Kiel,Germany

PostPosted: Mon 11 Mar 2013, 13:45    Post subject:  

Sylvander wrote:
I have little to no understanding of all of this stuff.

Could you give explicit instructions as to what I aught to do?
And explanations needed to give me essential understanding needed to get it right?

I would like to introduce you to the man command:
man <command>
ie
Code:
man mke2fs

In Puppy while connected to the internet, man should run the pman script to show you a manual page of the desired <command>. I personally had not used the -S option to mke2fs. mkfs.extX is usually a link to the mke2fs binary, like many commands are linked to busybox.
But it might be that you have a devx loaded that contains the real man binary. If you have no manpages installed by copying them from some bigger distros to your Puppy /usr/share/man folder, it would not show much.
Back to top
View user's profile Send private message Visit poster's website 
Sylvander

Joined: 15 Dec 2008
Posts: 3263
Location: West Lothian, Scotland, UK

PostPosted: Tue 12 Mar 2013, 05:22    Post subject:  

amigo:
1. "I'm still wondering if you ever really formatted the drive or only set the partition type?"
Originally, the drive was partitioned...
Then that partition formatted as EXT3...
Then the formatting changed to FAT32...
Then it all went bad when I tried to copy some files to the partition.
You'll see [almost all] of the rest of my actions reported in this thread.
My head is in a spin, and I don't really understand all of the things I've been instructed to do, and then done.

Karl Godt:
2. I entered the command:
Code:
man mke2fs

And got the display of information.
I can only hope this will help me better understand its use.

3. Tried entering:
Code:
dumpe2fs /dev/sdb1 | grep -i backup

...and got:
Code:
dumpe2fs /dev/sdb1 | grep -i backup
dumpe2fs 1.41.14 (22-Dec-2010)
dumpe2fs: Bad magic number in super-block while trying to open /dev/sdb1
#

...which is nothing like the output you got.
Am I doing something wrong?
I don't know how it would open sdb1, since that [partition] doesn't exist [according to GParted and other programs].

4. "It is critical to specify the correct filesystem block-
size when using this option, or there is no chance of recovery.
"
Sounds DANGEROUS...
Especially when I don't understand the use of the command.
You'd need to lead me by the hand, explaining each step in detail.
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3861
Location: Kiel,Germany

PostPosted: Tue 12 Mar 2013, 14:42    Post subject:  

*e2fs commands like tune2fs, mke2fs and dumpe2fs are only working for ext2-4 formatted partitions.

Since you already changed that in fdisk or formatted in gparted to some fat* , *e2fs progs won't work somehow. Probably there would come a multicall binary one day, like kmod or busybox managing most filesystems, probably when WindowsOS start to use a new filesystem, giving fat and ntfs to open source.
Back to top
View user's profile Send private message Visit poster's website 
Sylvander

Joined: 15 Dec 2008
Posts: 3263
Location: West Lothian, Scotland, UK

PostPosted: Tue 12 Mar 2013, 15:15    Post subject:  

The drive partitioning->formatting seems to be corrupted in some way such that it is either:
1. Not recognized as one or the other...
Because it's neither completely one or the other.
Or...
2. Both sets of formatting are seen and are conflicting.

It's all beyond my understanding. Confused
I tried using a program->command that would work with EXT3...
And then used a prog->command that works with FAT32...
And neither succeeded.
Back to top
View user's profile Send private message 
ETP


Joined: 19 Oct 2010
Posts: 487
Location: UK

PostPosted: Wed 13 Mar 2013, 05:52    Post subject: Rabid Stick  

Hi Sylvander,

Could you please humour me & try my suggestion.

www.murga-linux.com/puppy/viewtopic.php?p=689544#689544

p.s. I sent you a PM as you had marked the thread as solved but then continued to post. Smile

_________________
Regards ETP
Accessibility Pups: -- Magoo -- The Pup With No Name -- MouseCam -- Obedient
Back to top
View user's profile Send private message 
Sylvander

Joined: 15 Dec 2008
Posts: 3263
Location: West Lothian, Scotland, UK

PostPosted: Wed 13 Mar 2013, 11:36    Post subject:  

Typing from FalconFour's UBCD->MiniXP...
[All I have that resembles an XP OS]
Previously:

1. Downloaded [within Slacko-5.3.3.1] the files:
16Meg5493.img
win32diskmanager-v0.7-binary.zip

To a folder in my FAT32 partition sda2->[now E: in MiniXP].
Unzipped the zip file, and got all of the enclosed files, including the Win32DiskImager.exe file.

2. Rebooted using the FalconFour's UBCD, chose the MiniXP OS.

3. Once in there, used Windows Explorer to navigate to the Win32DiskImager.exe file, right-clicked it and chose to Open.
The following warning was displayed:
File Error:
...while querying the properties.
This usually means something is currently accessing the device; please close all applications and try again.
Error 1: Incorrect function.

Clicked OK, and the warning window closed, and the program window was properly displayed.

4. Used the navigation icon to choose the image img file.
The full path and file name was correctly displayed in the window.
I clicked the WRITE button to write data in image file to device.
Got warning asking if I was sure.
Told it to proceed.

5. Got 2nd warning:
Write error:
...when attempting to write data
[img file] to handle.
Error 19: The media is write protected.


6. What now?
Back to top
View user's profile Send private message 
ETP


Joined: 19 Oct 2010
Posts: 487
Location: UK

PostPosted: Wed 13 Mar 2013, 12:22    Post subject: Rabid Stick  

Hi Sylvander,

Any Windows OS should suffice but the imager does need to be run from the hard drive.

Note what step2 requires:


Quote:
1. Delete all partitions on your target device.

2. Unplug any sticks or cards other than your target device.

3. In XP use Win32diskimager to write the image to the target.

Stop after writing the image (step 3) and attempt to boot from it on your own PC.
If it boots to a menu stop the countdown then select “power off”.

Then use any running puppy and GPARTED to format the second partition as EXT4.

Neither FalconFour's UBCD->MiniXP nor Wine will work.

_________________
Regards ETP
Accessibility Pups: -- Magoo -- The Pup With No Name -- MouseCam -- Obedient
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2173

PostPosted: Wed 13 Mar 2013, 13:06    Post subject:  

So, the drive was partitioned and formatted with ext3 fs. Then the drive was reformatted as FAT -no mention about the partition type. Later drive was unmountable.

Let me say again:
1. Let the drive be unmounted before you start(I know it is unmountable at the moment)
2. If the drive is not partitioned or has the wrong partition type, then run fdisk or cfdisk and cretae the partition with type '83' for normal linux filesystems.
3. format the drive using mke2fs or mkfs.ext2:
mke2fs -F 32 /dev/sd(drive and partition number)

Now, it should be mountable. In the case of the OP, the current situation seems to be that number 1 and number 2 are already done. Please try number 3 again (if it was even done before) and then see if the drive is still unmountable.
Back to top
View user's profile Send private message 
Sylvander

Joined: 15 Dec 2008
Posts: 3263
Location: West Lothian, Scotland, UK

PostPosted: Wed 13 Mar 2013, 16:03    Post subject:  

Did the above [correctly?], and got this:
Code:
# mke2fs -F 32 /dev/sdb1
mke2fs 1.41.14 (22-Dec-2010)
mke2fs: invalid blocks count '/dev/sdb1' on device '32'
#


I'd tried step 2 again, and the partition type was Linux/83 in fdisk. [I need detailed instructions]
Then I wrote the changes, then tried step 3.
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2173

PostPosted: Wed 13 Mar 2013, 16:22    Post subject:  

Oh wait, I was doing something else while I wrote that -you want an ext2 filesystem, right? Run this instead:
mkfs.ext2 /dev/sdb1
and then see if it mounts(if the command succeeds).
Back to top
View user's profile Send private message 
Sylvander

Joined: 15 Dec 2008
Posts: 3263
Location: West Lothian, Scotland, UK

PostPosted: Wed 13 Mar 2013, 21:26    Post subject:  

Here's what I get:
Code:
# mkfs.ext2 /dev/sdb1
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
61568 inodes, 246272 blocks
12313 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=255852544
8 block groups
32768 blocks per group, 32768 fragments per group
7696 inodes per group
Superblock backups stored on blocks:
   32768, 98304, 163840, 229376

Writing inode tables: done                           
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 34 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
#

Is this good?
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3861
Location: Kiel,Germany

PostPosted: Wed 13 Mar 2013, 21:40    Post subject:  

Looks OK.

Now run
Code:
e2fsck -b 32768 -v -f -c /dev/sdb1

OR
Code:
e2fsck -b $((32768*4)) -v -f -c /dev/sdb1

in case e2fsck counts blocksizes of 1KiB while other e2fs-tools might count 4096Byte blocks .
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 6 of 11 [156 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0848s ][ Queries: 13 (0.0059s) ][ GZIP on ]