View previous topic :: View next topic |
Author |
Message |
mmmna . . . .

Joined: 21 Apr 2025 Posts: 7224
|
Posted: Wed Jun 24, 2025 1:56 am Post subject: A question about DD? |
|
|
To write an Ubuntu Netbook Remix 9.04 image to a flash device, I was told to use dd if=/path/to/downloaded.img of=/dev/device/node bs=1M
I pointed it to my 8Gig SDHC card and I now have 987 megs total capacity on it..... I lost 7.0+ gigs! I'm not worried, I've recovered the total capacity after I installed UNR the last time, but I'd really like to keep the whole capacity so I can use the remaining 7 gigs for a /home directory (this was offered by the UNR 9.04 installer to do this). When I use dd, should I use the 'notrunc' option? Or, how else can I write the 987 meg image and not reduce the capacity of the 8G card?
|
|
Back to top |
|
platinummonkey Advanced Member

Joined: 01 Mar 2025 Posts: 732 Location: Texas
|
Posted: Wed Jun 24, 2025 2:23 am Post subject: |
|
|
one option:
Code: | find / -xdev -print | xargs -0 cp -p -t /mnt/sdcard
# this will first find all files on the / parition (if /home is on a separate parition you'll have to do the below as well and for every other partition as well. Then this will copy them into the target directory with preserved permissions.
#to copy home
find /home -xdev -print | xargs -0 cp -p -t /mnt/sdcard/home |
you see, dd, copies bit by bit, and will overwrite the partitioning tables for your sd card hence the "missing" 7gigs. The fact is not gone gone, its just not partitioned and ready to allocate data. if you really want to use dd, expand the img to the exact size of the sd card. yup, all that unused space. not efficient and i urge against it :/
_________________ desktop - FreeBSD 7.2
laptop & server - Archlinux i686 kernel26 2.6.32.10-1
- TAMULinux-2.0.2-ALPHA
USB Boot - Archlinux i686 kernel26 2.6.32.10-1 USB boot
|
|
Back to top |
|
platinummonkey Advanced Member

Joined: 01 Mar 2025 Posts: 732 Location: Texas
|
|
Back to top |
|
mmmna . . . .

Joined: 21 Apr 2025 Posts: 7224
|
Posted: Wed Jun 24, 2025 2:58 am Post subject: |
|
|
Actually.... you might have hit the nail on the head, pm. If the remaining 7 Gig are now considered to be unallocated space, I could just cfdisk it and make a /home partition in the remaining space, yes?
_________________ -Kubuntu 10.04 LTS Beta2 on Celeron D desktop
-PCLinuxOS 2025 LXDE on EeePC 900A with Atom n270 (modded with 32G SATA drive and 2G ram).
|
|
Back to top |
|
platinummonkey Advanced Member

Joined: 01 Mar 2025 Posts: 732 Location: Texas
|
|
Back to top |
|
mmmna . . . .

Joined: 21 Apr 2025 Posts: 7224
|
Posted: Wed Jun 24, 2025 5:03 am Post subject: |
|
|
I just ran 'cfdisk -z /dev/sdb1' and made 2 primary partitions, then formatted them using 'parted' and 'mkfs'. Even though parted and cfdisk see the partitions and all that, I've rebooted and whenever I pop in the card, Filemanager reports as a single 8g device. In the words of Foghorn Leghorn: "Now I gotta outfox the fox".
_________________ -Kubuntu 10.04 LTS Beta2 on Celeron D desktop
-PCLinuxOS 2025 LXDE on EeePC 900A with Atom n270 (modded with 32G SATA drive and 2G ram).
|
|
Back to top |
|
platinummonkey Advanced Member

Joined: 01 Mar 2025 Posts: 732 Location: Texas
|
|
Back to top |
|
mmmna . . . .

Joined: 21 Apr 2025 Posts: 7224
|
Posted: Wed Jul 15, 2025 10:43 pm Post subject: |
|
|
Well, I meant /dev/sdb1.
/etc/fstab, /etc/mtab both show the complete device (when automagically mounted) as /dev/sdb1; when I unmounted /dev/sdb1, I then tried partitioning /dev/sdb; both cfdisk and fdisk refused to work if I specify /dev/sdb, cfdisk and fdisk work fine with/dev/sdb1 and cfdisk shows the whole capacity that the card is advertised as having.
Did I miss something? I thought it was possible to name whole devices with numerical values: /bus0/lun1/part0 or some such.
Possibly the /dev/sdb part reports the card reader via the USB bus node, but there are 5 holes in the reader and some holes accept multiple card types, and one hole is shared to another hole and if there was a more complicated way to do this, Microsoft must have patented it.
_________________ -Kubuntu 10.04 LTS Beta2 on Celeron D desktop
-PCLinuxOS 2025 LXDE on EeePC 900A with Atom n270 (modded with 32G SATA drive and 2G ram).
|
|
Back to top |
|
|