[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libgparted bug.



On Friday 09 February 2018 03:05:23 deloptes wrote:

> Gene Heskett wrote:
> > Trying to make a backup image of a 64GB bootable sdcard. Th os say
> > its 59.b GB when it mounts the original, but pull copy to a file and
> > its nearly a megabyte bigger than 64gigs.  So obviously the file is
> > bigger than a brand new unformatted disk.
>
> Hi Gene, you should know each partition has header or meta data, that
> is not visible after mount. I can't recall where, but there was a
> document (perhaps on Debian) that explained how the meta data looks
> like. So basically with each partition operation you add a layer on
> top of the physical device. For example you create a luks partition,
> it adds some meta data (perhaps 1-2MB), you add a LVM on top it also
> adds some meta data, you add the partition, it also adds some meta
> data.
>
> The other concern could be that the 64GB are actually GB by 1000
> (sales GB) and not GiB.
> For example my HDD and SSD report this
>
> sudo fdisk -l /dev/sda
> Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
>
> sudo fdisk -l /dev/sdb
> Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 sectors
>
> I bought 500GB which seems to be equivalent of 465.8 GiB
>
>
I've been playing in the night with gparted, which loads up the operating 
card out of the rockchip, which shows that a bit over 4GiB is used out 
of 59.6GiB for partition 7, the last partition in it, so I unmount it, 
select move/resize, and pull the right end of the gui's part 7 bar down 
to about 10GiB. which then shows 49GiB and change of unallocated space.

All of these sd images are shrunken in a similar manner, and once 
installed on whatever size of sd card you have, and that will hold the 
decompressed image, 8 gb is more than enough, and the last partition 
will be autoexpanded on the next boot to allocate the rest of the card.

So raspian, ayyufan, and all these guys obviously have a way to do this 
shrinkage down to only whats used.

But running gparted as root, it refuses to resize the SOB so I can turn 
around and reinstall a working system on an 8, 16, 32, 64 or even a 
128GiB card.

But gparted, running as root, refuses to do it, and its log info makes 
zero sense.

Because I want exactly the same file as you can down load. And this 
includes the stuff I've built and installed to get it to a fully working 
for my purposes install.

But, and heres the but, I have got to be able to make copies of a working 
install, but with a realtime kernel I've built. That way, I always have 
a backup system on the last card that I don't have to start over from 
scratch to rebuild.

Heres that log from telling it to resize part7.

Sorry about the html, but thats how gparted saves it.

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 
Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en-US' lang='en-US'>
<head>
<meta http-equiv='Content-Type' content='text/html;charset=utf-8' />
<title>GParted Details</title>
</head>
<body>
<p>GParted 0.12.1 --enable-libparted-dmraid</p>
<p>Libparted 2.3</p>
<table border='0'>
<tr>
<td colspan='2'>
<b>Shrink /dev/sdd7 from 59.56 GiB to 6.91 
GiB</b>&nbsp;&nbsp;00:00:01&nbsp;&nbsp;&nbsp;&nbsp;( ERROR )
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>
<table border='0'>
<tr>
<td colspan='2'>
calibrate /dev/sdd7&nbsp;&nbsp;00:00:00&nbsp;&nbsp;&nbsp;&nbsp;( 
SUCCESS )
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>
<table border='0'>
<tr>
<td colspan='2'>
<i>path: /dev/sdd7<br />start: 262,144<br />end: 125,171,678<br />size: 
124,909,535 (59.56 GiB)</i>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border='0'>
<tr>
<td colspan='2'>
check file system on /dev/sdd7 for errors and (if possible) fix 
them&nbsp;&nbsp;00:00:00&nbsp;&nbsp;&nbsp;&nbsp;( ERROR )
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>
<table border='0'>
<tr>
<td colspan='2'>
<b><i>e2fsck -f -y -v /dev/sdd7</i></b>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>
<table border='0'>
<tr>
<td colspan='2'>
<i>/dev/sdd7 is mounted.<br /></i>
</td>
</tr>
</table>
<table border='0'>
<tr>
<td colspan='2'>
<i>e2fsck 1.42.5 (29-Jul-2012)<br />e2fsck: Cannot continue, 
aborting.<br /><br /><br /></i>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>========================================</p>
</body>
</html>

Now part7 is NOT mounted which would explain the e2fsck failure.
Now, it does NOT tell me that e2fsck failed in the messages I see on 
screen.

> Why don't you tar.gz or tar.bz2 your data instead of pulling multiple
> 0-bytes into backup?
>
That should be adequately explained above.

> regards

<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 
Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en-US' lang='en-US'>
<head>
<meta http-equiv='Content-Type' content='text/html;charset=utf-8' />
<title>GParted Details</title>
</head>
<body>
<p>GParted 0.12.1 --enable-libparted-dmraid</p>
<p>Libparted 2.3</p>
<table border='0'>
<tr>
<td colspan='2'>
<b>Shrink /dev/sdd7 from 59.56 GiB to 8.34 
GiB</b>&nbsp;&nbsp;00:00:01&nbsp;&nbsp;&nbsp;&nbsp;( ERROR )
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>
<table border='0'>
<tr>
<td colspan='2'>
calibrate /dev/sdd7&nbsp;&nbsp;00:00:00&nbsp;&nbsp;&nbsp;&nbsp;( 
SUCCESS )
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>
<table border='0'>
<tr>
<td colspan='2'>
<i>path: /dev/sdd7<br />start: 262,144<br />end: 125,171,678<br />size: 
124,909,535 (59.56 GiB)</i>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border='0'>
<tr>
<td colspan='2'>
check file system on /dev/sdd7 for errors and (if possible) fix 
them&nbsp;&nbsp;00:00:01&nbsp;&nbsp;&nbsp;&nbsp;( ERROR )
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>
<table border='0'>
<tr>
<td colspan='2'>
<b><i>e2fsck -f -y -v /dev/sdd7</i></b>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td>
<table border='0'>
<tr>
<td colspan='2'>
<i>/dev/sdd7 is mounted.<br /></i>
</td>
</tr>
</table>
<table border='0'>
<tr>
<td colspan='2'>
<i>e2fsck 1.42.5 (29-Jul-2012)<br />e2fsck: Cannot continue, 
aborting.<br /><br /><br /></i>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>========================================</p>
</body>
</html>


So I go back and repeat it, see above and it says the partition is not 
mounted on the gparted screen, but the error message says it is. So 
something is automounting it, what do I kill to stop that?


Thanks for any hints.

-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>


Reply to: