How to 'tar" /dev/sdb2 ?

View: New views
8 Messages — Rating Filter:   Alert me  

How to 'tar" /dev/sdb2 ?

by William Pretty Security Inc :: Rate this Message:

| View Threaded | Show Only this Message

Hi All;

I am hoping someone out there can help.
This is probably a really BASIC Linux question so I apologize :-)

I am trying to create a backup of the root file system of my uSD card.
I tried to "dd" the whole card and it didn't copy all the files properly
so I am settling for the rootfs partition.

What I want to do is 'tar' all of /dev/sdb2 ...

I tried tar and bzip2. Neither seem to work.
I tried using the file manager GUI from Ubuntu, but it didn't copy the files

correctly either.

There must be a way to do this?

Thanks;

Bill

"Amat victoria curam "




------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: How to 'tar" /dev/sdb2 ?

by Greg Kogut :: Rate this Message:

| View Threaded | Show Only this Message

Sorry my dd solution didn't work.

Did you mount the partition prior to tarring it?

E.g.

>sudo mkdir /mnt/tmpmnt
>mount /dev/sdb2 /mnt/tmpmnt

Take look in there with 'ls' just to make sure.

>sudo tar -cvf tarfile.tar /mnt/tmpmnt


Greg





From: William Pretty Security Inc <bill.pretty@...>
To: 'General mailing list for gumstix users.' <gumstix-users@...>
Sent: Monday, February 27, 2012 5:24 PM
Subject: [Gumstix-users] How to 'tar" /dev/sdb2 ?

Hi All;

I am hoping someone out there can help.
This is probably a really BASIC Linux question so I apologize :-)

I am trying to create a backup of the root file system of my uSD card.
I tried to "dd" the whole card and it didn't copy all the files properly
so I am settling for the rootfs partition.

What I want to do is 'tar' all of /dev/sdb2 ...

I tried tar and bzip2. Neither seem to work.
I tried using the file manager GUI from Ubuntu, but it didn't copy the files

correctly either.

There must be a way to do this?

Thanks;

Bill

"Amat victoria curam "




------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users



------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: How to 'tar" /dev/sdb2 ?

by Ben Keane :: Rate this Message:

| View Threaded | Show Only this Message

Can you expand on "didn't copy the files correctly either"?

>-----Original Message-----
>From: William Pretty Security Inc [mailto:bill.pretty@...]
>Sent: Tuesday, 28 February 2012 11:24 AM
>To: 'General mailing list for gumstix users.'
>Subject: [Gumstix-users] How to 'tar" /dev/sdb2 ?
>
>Hi All;
>
>I am hoping someone out there can help.
>This is probably a really BASIC Linux question so I apologize :-)
>
>I am trying to create a backup of the root file system of my uSD card.
>I tried to "dd" the whole card and it didn't copy all the
>files properly so I am settling for the rootfs partition.
>
>What I want to do is 'tar' all of /dev/sdb2 ...
>
>I tried tar and bzip2. Neither seem to work.
>I tried using the file manager GUI from Ubuntu, but it didn't
>copy the files
>
>correctly either.
>
>There must be a way to do this?
>
>Thanks;
>
>Bill
>
>"Amat victoria curam "
>
>
>
>
>---------------------------------------------------------------
>---------------
>Keep Your Developer Skills Current with LearnDevNow!
>The most comprehensive online learning library for Microsoft
>developers is just $99.99! Visual Studio, SharePoint, SQL -
>plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future
>releases when you subscribe now!
>http://p.sf.net/sfu/learndevnow-d2d
>_______________________________________________
>gumstix-users mailing list
>gumstix-users@...
>https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>______________________________________________________________________
>CAUTION: This message was sent via the Public Internet and its
>authenticity cannot be guaranteed.
>

PROPRIETARY: This e-mail contains proprietary information some or all of which may be legally privileged.  It is intended for the recipient only.  If an addressing or transmission error has misdirected this e-mail, please notify the authority by replying to this e-mail.  If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail.

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Parent Message unknown Re: How to 'tar" /dev/sdb2 ?

by chris2007 :: Rate this Message:

| View Threaded | Show Only this Message

mkdir /media/rootfspart
mount /dev/sdb2 /media/rootfspart
cd /media/rootfspart
tar -czvf /<path_to_where_you_want_the_tarball>/rootfs.tar.gz *

Chris

On Mon, Feb 27, 2012 at 7:24 PM, William Pretty Security Inc <bill.pretty@...> wrote:
Hi All;

I am hoping someone out there can help.
This is probably a really BASIC Linux question so I apologize :-)

I am trying to create a backup of the root file system of my uSD card.
I tried to "dd" the whole card and it didn't copy all the files properly
so I am settling for the rootfs partition.

What I want to do is 'tar' all of /dev/sdb2 ...

I tried tar and bzip2. Neither seem to work.
I tried using the file manager GUI from Ubuntu, but it didn't copy the files

correctly either.

There must be a way to do this?

Thanks;

Bill

"Amat victoria curam "




------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Parent Message unknown Re: How to 'tar" /dev/sdb2 ?

by James Linder-4 :: Rate this Message:

| View Threaded | Show Only this Message


On 28/02/2012, at 9:37 AM, gumstix-users-request@... wrote:

> I am hoping someone out there can help.
> This is probably a really BASIC Linux question so I apologize :-)
>
> I am trying to create a backup of the root file system of my uSD card.
> I tried to "dd" the whole card and it didn't copy all the files properly
> so I am settling for the rootfs partition.
>
> What I want to do is 'tar' all of /dev/sdb2 ...
>
> I tried tar and bzip2. Neither seem to work.
> I tried using the file manager GUI from Ubuntu, but it didn't copy the files
>
> correctly either.
>
> There must be a way to do this?

This is unix stuff, not gumstix but be helped

In general dd is a bad choice. dd makes an exact copy so cloning an exactly-the-same SD card or creating a copy that you can put back etc

tar backs up FILES so eg

mount /dev/sda2 /mnt
ls /mnt # there it all is. Then ...
tar cvjf /mnt a-name.tbz

saves all the files in /mnt in a-name.tbz which you cab put back on another file system etc as you will

James
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: How to 'tar" /dev/sdb2 ? <solution>

by William Pretty Security Inc :: Rate this Message:

| View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I may have found a solution:

 

http://wiki.gumstix.org/index.php?title=MicroSd

 

dd if=/dev/sourcecard bs=1M | gzip -c > somefile.gz

gunzip -c somefile.gz | dd of=/dev/destcard bs=1M

 

Bill

 

"People sleep peaceably in their beds at night only because rough men

stand ready to do violence on their behalf." - George Orwell

 

From: Chris Crews [mailto:christopher.crews07@...]
Sent: Monday, February 27, 2012 8:40 PM
To: General mailing list for gumstix users.
Subject: Re: [Gumstix-users] How to 'tar" /dev/sdb2 ?

 

mkdir /media/rootfspart

mount /dev/sdb2 /media/rootfspart

cd /media/rootfspart

tar -czvf /<path_to_where_you_want_the_tarball>/rootfs.tar.gz *

 

Chris

On Mon, Feb 27, 2012 at 7:24 PM, William Pretty Security Inc <bill.pretty@...> wrote:

Hi All;

I am hoping someone out there can help.
This is probably a really BASIC Linux question so I apologize :-)

I am trying to create a backup of the root file system of my uSD card.
I tried to "dd" the whole card and it didn't copy all the files properly
so I am settling for the rootfs partition.

What I want to do is 'tar' all of /dev/sdb2 ...

I tried tar and bzip2. Neither seem to work.
I tried using the file manager GUI from Ubuntu, but it didn't copy the files

correctly either.

There must be a way to do this?

Thanks;

Bill

"Amat victoria curam "




------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

 


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: How to 'tar" /dev/sdb2 ? <solution>

by Ben Keane :: Rate this Message:

| View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
That is combining both options together - sort of. It is creating a dd image like you first did, but compressing it. If your dd image didn't work in the first place, it will just compress the broken image.


From: William Pretty Security Inc [mailto:bill.pretty@...]
Sent: Tuesday, 28 February 2012 12:25 PM
To: 'General mailing list for gumstix users.'
Subject: Re: [Gumstix-users] How to 'tar" /dev/sdb2 ? <solution>

I may have found a solution:

 

http://wiki.gumstix.org/index.php?title=MicroSd

 

dd if=/dev/sourcecard bs=1M | gzip -c > somefile.gz

gunzip -c somefile.gz | dd of=/dev/destcard bs=1M

 

Bill

 

"People sleep peaceably in their beds at night only because rough men

stand ready to do violence on their behalf." - George Orwell

 

From: Chris Crews [mailto:christopher.crews07@...]
Sent: Monday, February 27, 2012 8:40 PM
To: General mailing list for gumstix users.
Subject: Re: [Gumstix-users] How to 'tar" /dev/sdb2 ?

 

mkdir /media/rootfspart

mount /dev/sdb2 /media/rootfspart

cd /media/rootfspart

tar -czvf /<path_to_where_you_want_the_tarball>/rootfs.tar.gz *

 

Chris

On Mon, Feb 27, 2012 at 7:24 PM, William Pretty Security Inc <bill.pretty@...> wrote:

Hi All;

I am hoping someone out there can help.
This is probably a really BASIC Linux question so I apologize :-)

I am trying to create a backup of the root file system of my uSD card.
I tried to "dd" the whole card and it didn't copy all the files properly
so I am settling for the rootfs partition.

What I want to do is 'tar' all of /dev/sdb2 ...

I tried tar and bzip2. Neither seem to work.
I tried using the file manager GUI from Ubuntu, but it didn't copy the files

correctly either.

There must be a way to do this?

Thanks;

Bill

"Amat victoria curam "




------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

 


______________________________________________________________________
CAUTION: This message was sent via the Public Internet and its authenticity cannot be guaranteed.

PROPRIETARY: This e-mail contains proprietary information some or all of which may be legally privileged. It is intended for the recipient only. If an addressing or transmission error has misdirected this e-mail, please notify the authority by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail.

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Parent Message unknown Re: How to 'tar" /dev/sdb2 ?

by James Linder-4 :: Rate this Message:

| View Threaded | Show Only this Message

Ooops error on tar comand ....

On 28/02/2012, at 9:37 AM, gumstix-users-request@... wrote:

> I am hoping someone out there can help.
> This is probably a really BASIC Linux question so I apologize :-)
>
> I am trying to create a backup of the root file system of my uSD card.
> I tried to "dd" the whole card and it didn't copy all the files properly
> so I am settling for the rootfs partition.
>
> What I want to do is 'tar' all of /dev/sdb2 ...
>
> I tried tar and bzip2. Neither seem to work.
> I tried using the file manager GUI from Ubuntu, but it didn't copy the files
>
> correctly either.
>
> There must be a way to do this?

This is unix stuff, not gumstix but be helped

In general dd is a bad choice. dd makes an exact copy so cloning an exactly-the-same SD card or creating a copy that you can put back etc

tar backs up FILES so eg

mount /dev/sda2 /mnt
ls /mnt # there it all is. Then ...
tar cvjf a-name.tbz /mnt

or as somebody else posted
cd /mnt

then tar cvjf a-name-somewhere-else.tbz *
meaning tar everything HERE to a-name-somewhere-else.tbz

saves all the files in /mnt in a-name.tbz which you cab put back on another file system etc as you will

James
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users