Welcome! Log In Create A New Profile

Advanced

Change USB-debian for a bigger USB key

Posted by R-One 
Change USB-debian for a bigger USB key
December 13, 2010 07:24AM
Dear all,

I followed Jeff instructions to install debian squeeze on a usb key 1 GB to operate my brand new dockstar device.
It was very straightfoward. Thank you for this very good help.
I have been working with it for a few days installing a few packages such as samba and others but my usb device is now full and I cannot install packages anymore.

Should I have selected more carefully the packages to be installed?
Is it possible to replace my 1GB key with a 4 GB key?

If yes, what is the procedure?
I am a linux beginner and I would not like to make bad operation.

Thank you for your help.

Erwan
Re: Change USB-debian for a bigger USB key
December 13, 2010 07:37AM
Just an additional question to my previous mail:

Is there any special caution to consider when upgrading one's debian initial version on a device with limited memory space?
- Files to remove once package install is complete?
- Select small profiles packages? How to identify them?

I would like to setup hotplug functionality on my dockstar. Is such functionality too heavy?
How would you proceed?

Thank you for advice.

Erwan
jp1
Re: Change USB-debian for a bigger USB key
December 13, 2010 09:29AM
All steps to be performed on a Linux PC. If you don't run linux on your desktop, grab any Live Linux CD and boot from it or run it from VirtualBox/Vmware.
1. dd the contents of the 1gb key (assume it is sda) to the 4gb key directly or via a file.
dd if=/dev/sda of=backup.1gb.img
2. Restore to 4gb key. I assume it is visible as sdb.
dd if=backup.1gb.img of=/dev/sdb
3. Resize the root partition (sda1 for Jeff's installer) with gparted or any partitioning tool of your choice which supports ext2 resizing non-destructively.
Re: Change USB-debian for a bigger USB key
December 13, 2010 09:42AM
Yeah get a 4 gig stick and then you don't have to worry about running out of space. :)

apt-get remove ( and then the name of the program will remove it from dockstar, and look at the info lines as you remove it because it will usually tell you how to remove other files connected with that program and say something like autoremove ....

4 gigs would allow you to have fun and try stuff and if you screw up , just do another install. :)
Re: Change USB-debian for a bigger USB key
December 13, 2010 09:47AM
I run both of mine on a 8GB stick. It gives me enough room to share a few files on the flash rather than having to mess with a hard drive.

You can also do this right off the dockstar. Basically copying everything from one stick to the other. There is a post already in this forum on how to do it. It's from a few months ago.
Re: Change USB-debian for a bigger USB key
December 13, 2010 12:20PM
I just copied to a larger drive by (after partitioning)

Booting up to the rescue system and then:

mkdir /tmp/old
mkdir /tmp/new

mount /dev/sda1 /tmp/old
mount /dev/sdb1 /tmp/new

cp -a /tmp/old/* /tmp/new/
Re: Change USB-debian for a bigger USB key
December 13, 2010 01:16PM
R-One, see http://forum.doozan.com/read.php?2,2962,2964#msg-2964 for how to replicate your root partition onto a bigger drive.

The details should be the same regardless of whether you are moving to a HD or a different thumb drive.

Good luck!
rat
Re: Change USB-debian for a bigger USB key
December 13, 2010 01:55PM
R-One Wrote:
-------------------------------------------------------
> Is there any special caution to consider when
> upgrading one's debian initial version on a device
> with limited memory space?
> - Files to remove once package install is
> complete?
> - Select small profiles packages? How to identify
> them?

apt-get clean
apt-get purge
apt-get autoremove

That'll clear out the downloaded .deb packages (think of them like OS specific zip archives of the files that were installed) and cached info relating to them.

> I would like to setup hotplug functionality on my
> dockstar. Is such functionality too heavy?

I think you're overstressing what would constitute a resource drain on the device. I had the debian base install with tightvncserver, xwindows, xfce, several dozen different themes and icon packs, all of that loaded while browsing a website with Midori... and I barely broke 50MB ram use with no memory being put into swap.

As far as storage/flash/hard drive space goes (which is not memory)... I have a fairly bloated install going right now because I'm trying out a few things here and there. For example, installing something like Finch (text only Pidgin) for instant messaging ate up an extra 80MB I didn't need used because of dependencies, etc... so I could probably stand a bit of cleaning up and removing of unused packages. I've got a full graphical desktop running (xfce + xwindows), several chat clients (centerim, irssi, silc, each of which do their own logfiles), etc... 957MB used, 2.5GB free on my 4GB thumbdrive. It's gonna be hard to really chew up space unless you never do any cleaning up at all or insist on copying everything to your root filesystem instead of adding another thumbdrive.

Other ways to free up space:

deborphan in the console. It'll check packages, let you know which ones have been orphaned (no longer depending on anything or no longer being depended on) and give you the option to uninstall them.

localepurge in the console. It'll ask you to select your primary language, "en" for example, for english... and purge the other languages out every time you install new packages. Can save you upwards of several hundred megabytes when you start adding all the unused documentation together.

If you decide to load up an xwindows based gui for VNCing into, there's another package you can install called BleachBit. It combines several cleanup functions into a GUI and does a pretty good job dusting out the corners for space that can be freed up.
Re: Change USB-debian for a bigger USB key
December 13, 2010 02:38PM
I think "deborphan" is not a good idea, use "apt-get autoremove" instead. A nice tool is "dpigs" from the debian-package "debian-goodies" to show the biggest packages. In future i want to use 1.8 inch harddrive with my dockstar.
Re: Change USB-debian for a bigger USB key
December 14, 2010 06:21PM
Looks like others don't like to use a Windows machine but I have been using Acronis True Image back up software for back up USB drives and transfer to another drive with great success. You can either move up or down in size, either way. Convenient and reliable.
Re: Change USB-debian for a bigger USB key
December 14, 2010 08:46PM
Moved from 8GB key to 40GB Drive:

Created new drive with ubuntu(live cd) on main computer with partitions and desired size.
used dd to copy just the data partition. sda1 for example.

Need to set 'bootable' bit on partition.
Once I booted, cfdisk showed proper size, but df showed old size.
Needed to resize partition.
Did so via resize2fs on ubuntu.

Show sizes once you boot into system:
cfdisk for partition
fdisk -l /dev/sda for offsets and partition types
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: