Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
In playing with Raspberry Pi, I have had to deal with SD Card backups.
In order to have one backup .img to service cards of different sizes, I devised the following "strategy":
1. Shutdown the RPi and remove the card (say, 16GB), attaching it to the PC.
2. Using GParted, resize the partitions to the size of my smallest card (4GB).
3. DD the contents of the card on to an .img backup in my PC.
4. DD the backup .img on to the 4GB card, stick it into the RPi and boot.
5. Using GParted again, resize the bigger card to its original size.
I soon found that step 4 fails because DD does not care about partitions, it images the whole card in step 3, even though it is 80% 'empty'. Since working with SD cards is so excruciatingly slow (DD takes ages), I would like to know whether there is a way around step 3.
Disk /dev/sdb: 3904 MB, 3904897024 bytes
121 heads, 62 sectors/track, 1016 cylinders, total 7626752 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00014d34
Device Boot Start End Blocks Id System
/dev/sdb1 8192 122879 57344 c W95 FAT32 (LBA)
/dev/sdb2 122880 7639039 3758080 83 Linux
The device has a total of 7626572 sectors. Your partition table has partition 2 extending beyond the end of the device (to sector 7639039). I suspect your resizing of the larger drive was inexact due to gparted working in Gigabyte units.
As gparted works in Megabyte units (not Gigabyte, as I previously indicated), it looks like you could just resize down from your current 3670 MB to 3664 MB and it should fit just right. You will need to adjust the partitioning on the new drive to correct that oversized second partition.