ts-7000
[Top] [All Lists]

[ts-7000] Re: making a new Debian Linux micro disk from an old one, with

To:
Subject: [ts-7000] Re: making a new Debian Linux micro disk from an old one, with busybox linux.
From: "Jon L" <>
Date: Wed, 23 Dec 2009 14:14:13 -0000
Skuruz,

your analysis sounds very good.  Busybox linux doesn't have a mkfs.ext3 
command, but I think I'm past that since fdisk -l /dev/sda:

# fdisk -l /dev/sda

Disk /dev/sda: 1015 MB, 1015808000 bytes
32 heads, 63 sectors/track, 984 cylinders
Units = cylinders of 2016 * 512 = 1032192 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1               5          20       16128   c Win95 FAT32 (LBA)
/dev/sda2              21          23        3024  da Unknown
/dev/sda3              24          26        3024  da Unknown
/dev/sda4              27         560      538272  83 Linux


is showing the same format as the 2GB card.  tech support insisted that two 
partitions 2 and 3 were also necessary, but who know what experience the tech 
guy that answered the phone actually had.

If I just do the #dd command to the /dev/sda4 I should be good to go with your 
instructions, and I won't even have to modify the linuxrc since I made the 4 
partitions anyway. 

I'm assuming the /dev/sdaX devices and the /dev/nbdX devices are unmounted when 
I do the dd command.  I'll give it a try and see...



--- In  Serkan KÜRÜZ <> wrote:
>
> If u want use an 1Gb MicroSD it is easy to make it as an one partition disk.
> (the other partitions not necessary)
>
> Firstly,
>
> -          format your 1Gb disk as Ext3 (ex: #mkfs.ext3   /dev/sdc1)
>
> -          mount the old 2Gb disk and look at the which directory debian is
> mounted. (at your disk I think /dev/ndb0p4)
>
> -          use dd command for copy the debian to new disk partition. (ex:
> #dd if=/dev/ndb0p4 of=/dev/sdc1)
>
> Your disk is ready now.. But at the ARM busybox Linux it was setted boot SD
> from 4 paritioned disk. So u must change it for  1 partition.
>
> -          At busybox open the linuxrc-sdboot file (#vi linuxrc-sdboot ) and
> change the line as following.
>
> mount -oro /dev/nbd4 /mnt/root -> mount -oro /dev/nbd1 /mnt/root
>
> 
>
> I hope that it is useful for u.. good luck
>
> 
>
> Skuruz.
>
> 
>
> From:   On Behalf Of
> Jon L
> Sent: Wednesday, December 23, 2009 12:10 AM
> To: 
> Subject: [ts-7000] making a new Debian Linux micro disk from an old one,
> with busybox linux.
>
> 
>
>  
>
> Ok I have a TS-7500 and it has on its 2GB Micro SD card 4 partitions and a
> bootable Debian linux. The TS-7500 boots to Busybox Linux and from there I
> can umount the SD card and see its partitions:
>
> # fdisk -l /dev/nbd0
>
> Disk /dev/nbd0: 549.7 GB, 549755813888 bytes
> 1 heads, 62 sectors/track, 17318416 cylinders
> Units = cylinders of 62 * 512 = 31744 bytes
>
> Device Boot Start End Blocks Id System
> /dev/nbd0p1 5 42282 1310592 c Win95 FAT32 (LBA)
> /dev/nbd0p2 42282 42348 2048 da Unknown
> /dev/nbd0p3 42348 42414 2048 da Unknown
> /dev/nbd0p4 42414 59326 524288 83 Linux
>
> so now I want to make a new Micro SD card with these same information with a
> slight twist; I only have a 1GB Micro SD card. No real problem as I don't
> really need the FAT partition so I can take away from that. So I install the
> 1GB Micro SD card on the thumbdrive and plug that into the USB port of the
> TS-7500, and make up the 4 partitions on the /dev/sda device:
>
> # fdisk /dev/sda
> .......
> .......
> .......
>
> Command (m for help): p
>
> Disk /dev/sda: 1015 MB, 1015808000 bytes
> 32 heads, 63 sectors/track, 984 cylinders
> Units = cylinders of 2016 * 512 = 1032192 bytes
>
> Device Boot Start End Blocks Id System
> /dev/sda1 5 20 16128 c Win95 FAT32 (LBA)
> /dev/sda2 21 23 3024 da Unknown
> /dev/sda3 24 26 3024 da Unknown
> /dev/sda4 27 560 538272 83 Linux
> Command (m for help): w
> The partition table has been altered!:
>
> # fdisk -l /dev/sda
>
> Disk /dev/sda: 1015 MB, 1015808000 bytes
> 32 heads, 63 sectors/track, 984 cylinders
> Units = cylinders of 2016 * 512 = 1032192 bytes
>
> Device Boot Start End Blocks Id System
> /dev/sda1 5 20 16128 c Win95 FAT32 (LBA)
> /dev/sda2 21 23 3024 da Unknown
> /dev/sda3 24 26 3024 da Unknown
> /dev/sda4 27 560 538272 83 Linux
>
> Now for the question:
>
> Using the busybox linux, how do I get the contents of the 2GB's 3 partitions
> to the 3 partitions of the 1GB card?
>
> This is assuming that my partitions are acceptable, so if my partitions are
> not right please help me with them, I couldn't figure out how to make
> partitions 2 and 3 exactly 2048 like in the original 2GB micro SD card.
>
> TIA,
>
> Jleslie48
>




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
    
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU