LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 12-31-2011, 09:34 PM   #1
Tem2
LQ Newbie
 
Registered: Dec 2011
Posts: 21

Rep: Reputation: Disabled
Hard drive partitioning, backup and restore full disk images


I'm new to linux. Pretty decent understanding of windows based os, but I get the impression that that is unimpressive to you folk. I want to understand Linux basics, and I think a good place to start is to learn some disaster recovery stuff. How can i partition my drive and how can I make a disk image of my drive.
 
Old 01-01-2012, 03:50 AM   #2
DanceMan
Member
 
Registered: Mar 2009
Location: Vancouver BC
Posts: 91

Rep: Reputation: 22
GParted Live, or GParted (GUI partition editor) on a live linux disk like Ubuntu.


Clonezilla to image a partition or disk.

Happy New Year.
 
Old 01-01-2012, 04:00 AM   #3
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Has your system crashed or are you just inquiring?
 
Old 01-01-2012, 05:37 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Good question ....
No obvious panic, so might we presume pre-emptive inquiry ?.
 
Old 01-01-2012, 10:12 AM   #5
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,389

Rep: Reputation: 101Reputation: 101
Hi Tem2 and Happy New Year!

There are many theories on hard drive partition layout. Here is mine.

Basic rules:

1 - The operating system (including program files) should not be mixed with user files.
2 - Data is what is important.
3 - Always have at least 2 copies of important files (i.e. data)

On my current system I have the following hard drive layout which I created at the time of installation.

First drive sda - a 150 GB Western Digital Velociraptor (fast!)

sda1 - 10 GB - Linux installed here - mounted as /
sda2 - 10 GB - user profiles stored here - mounted as /home
sda3 - 8 GB - swap space
sda4 - the rest of the drive - used to store data - mounted as /data

Second drive sdb - a 750 GB WD Caviar Black - large but not as fast as the Velociraptor

sdb1 - the whole drive - mounted as /quitelarge

What goes where...

Linux and various programs are installed on sda1 except for some legacy Windows programs which I run under Wine. They install in my user profile on sda2. (I could probably tweak Wine that but I have not bothered.)

I minimize what is installed in my user profile on sda2. I moved my Firefox and Thunderbird files etc. to sda4. I do not use the various subdirectories under /home/ken - at least I do not leave data there.

Which brings me to sda4 or /data. I have it divided into two subdirectories /data/data and /data/static. Data which is subject to being routinely updated such as investment spreadsheets, Firefox and Thunderbird files, database files etc. are stored under /data/data. Other items which are not subject to change such as bank statements, receipts, pictures from my digital camera etc. are stored under /data/static. Bulk downloaded junk such as video clips etc. are stored on sdb1 /quitelarge. I do NOT care if they were to be lost. They could be downloaded again.

So here is my backup process...

Nightly I copy /data/data and /data/static to /quitlarge/mirror. I also make a tar/zip file of /home/ken and copy it to /quitelarge/mirror. Actually I keep 7 rolling backups of this data. Let me know if you are interested and I will share the script. These are HOT backups and can be done with the machine running.

Monthly I shutdown the PC and use a program called g4l (ghost for linux) to make a snapshot image of sda1 and sda2 to sdb1. This program works like Symantec/Norton Ghost. It will not image ext4 partitions so I format sda1 and sda2 as ext3. It will write to an ext4 partition so I use ext4 on the other partitions. I keep several iterations of this monthly process on my server. These are COLD backups.

Monthly I also burn /data/data and /data/static to a DVD which I store out in my shop away from the PC. Recently, as my bank gives me a free safety deposit box, I copy these files to a TrueCrypt encrypted SD memory card and put it in the box.

At the end of the year I burn an end of year DVD, make 2 copies and store one in the shop and one in the safe. I have also copied the files to a TrueCrypt container file, burn it to DVD and will put it in the safety deposit box when the bank opens tomorrow. I copied all of my 2011 data to /quitelarge/static/old_mirror/2011_backup and removed a lot of files from /data. This make for easy location of old data without digging out a DVD. Disk space is cheap :-) well at least it was before the floods in Thailand.

And in the event of a disaster - generally self inflicted - I can recover...

The OS by using g4l from a prior month's image. This is helpful if (when) I install a package which does not work or screws up other things or if I change a configuration which causes grief.

My user profile - if I delete a single file from the tar/zip file created during my nightly backup or if it is really hosed by using g4l and recovering all of sda2.

My important data from a DVD or SD card.

That is sort of my story. I used a similar approach in Windows NT and XP. Actually it goes back to CP/M on my Osborne. I scripted Wordstar and Supercalc to boot from diskette A, write their data to diskette B and upon exit prompt me to place the backup diskette in drive A. It would then copy any changed files to the backup diskette.

Feel free to ask any questions which this rambling post may prompt.

Ken
 
Old 01-08-2012, 06:39 PM   #6
Tem2
LQ Newbie
 
Registered: Dec 2011
Posts: 21

Original Poster
Rep: Reputation: Disabled
A little more detail as to what I'm trying to accomplish

Ken, thanks for your help. As I told you in my email, I'm trying to get my Dell Latitude 100L laptop upgraded to a newer version of Ubuntu. The laptop has 1 gb of memory and some serious shortcomings in that the cd drive is broken, the wireless network adapter has recently failed and its Ethernet port is not configured. My primary goal is to get my network adapter working. I guess I'd be satisfied if you guys can help me configure my Ethernet port at the very least. That will get me up and running with a network connected Linux station. What I'd really like to do is learn as much as I can in the process. Ideally, you guys can assist me in getting my laptop upgraded to a version of Ubuntu that doesn' require manual configuration of the Ethernet port. It's possible that just upgrading the operating system may fix my wireless adapter. Here's the challenging part to this project: I'd like to accomplish this with just my Dell and my iPad I, which is my only means of connecting to the internet for downloading files I'm sure to need.

Am I overstepping the boundaries of this forum by asking for this kind of help. Should I limit my requests to assistance with configuring my erhernet port?

Thanks again for all your help!
 
Old 01-08-2012, 08:24 PM   #7
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,389

Rep: Reputation: 101Reputation: 101
Hi Tem2,

Let me make sure I have a picture of the situation...

The laptop will boot to Ubuntu from its hard drive
The CD drive is not working with Ubuntu or anything else
The wireless and wired network cards are not working with Ubuntu
The laptop has a USB port which is working

And about the iPad (which I have never used)...

Does it have a USB port?
Does it have a CD or DVD drive to which it can connect?

Here is the initial plan of attack...

1 - determine what version of Ubuntu is installed on the laptop. To do this, open a terminal (command window) from the menu Applications, Accessories, Terminal. If you do not have a menu across the top of the screen and instead have a vertical strip of icons, click the Ubuntu circular icon near the top and type terminal.

In the terminal type the command
Quote:
lsb_release -a
and you will see a result such as
Quote:
ken@taylor12:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename lucid
which says that my system is running Ubuntu 10.04. Please post the result from the laptop.

2 - see what we can see about the network status of the laptop. Again in the terminal enter the command
Quote:
ifconfig
which should show something like
Quote:
ken@taylor12:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:25:64:e8:18:2c
inet addr:192.168.0.112 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::225:64ff:fee8:182c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8076932 errors:0 dropped:0 overruns:0 frame:0
TX packets:11342377 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5223309089 (5.2 GB) TX bytes:14815130274 (14.8 GB)
Interrupt:17
Please post the first couple of lines for eth0 and eth1 if present.

3 - if the version of Ubuntu is out of date we might try building a bootable USB flash drive with the most recent version of Ubuntu. If the laptop will boot from that it may establish a network connection. If so, perhaps we install that version on the laptop. If not, then Plan B.

As to your question
Quote:
Am I overstepping the boundaries of this forum by asking for this kind of help. Should I limit my requests to assistance with configuring my erhernet port?
Certainly not. The goal of the forum is I think to help folks to be successful in using Linux. That means solving problems, not just figuring out workarounds.

Post some more information when you can. I will have to learn a little about the iPad. I think my sister may have one. I will drop her an email.

Ken
 
Old 01-09-2012, 11:12 AM   #8
Tem2
LQ Newbie
 
Registered: Dec 2011
Posts: 21

Original Poster
Rep: Reputation: Disabled
Yes I have 2 working USB adapters on the laptop.

Ubuntu 9.10

No eth0 or eth1 data in the ifconfig display.

I'm thinking if you can help me configure the Ethernet adapter I'll be satisfied. The more I research the iPad file transfer procedure, the more I'd rather avoid it.
 
Old 01-09-2012, 01:30 PM   #9
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,389

Rep: Reputation: 101Reputation: 101
Lets see what hardware is present. Try this command
Quote:
lspci -v
and examine the blocks related to ehternet. My system shows
Quote:
05:00.0 Ethernet controller: Broadcom Corporation NetLink BCM57780 Gigabit Ethernet PCIe (rev 01)
Subsystem: Dell Device 0300
Flags: bus master, fast devsel, latency 0, IRQ 34
Memory at fbef0000 (64-bit, non-prefetchable) [size=64K]
Capabilities: <access denied>
Kernel driver in use: tg3
Kernel modules: tg3

06:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
Subsystem: Belkin Device 5000
Flags: bus master, medium devsel, latency 64, IRQ 22
I/O ports at e800 [size=256]
Memory at fbfffc00 (32-bit, non-prefetchable) [size=256]
Expansion ROM at fbfe0000 [disabled] [size=64K]
Capabilities: <access denied>
Kernel driver in use: 8139too
Kernel modules: 8139too, 8139cp
which represents two wired cards. If we can determine what card you have we can look for the proper driver.

As to the iPad... I have been doing some reading. If I had one I would not have it for long

Ken
 
Old 01-09-2012, 05:24 PM   #10
Tem2
LQ Newbie
 
Registered: Dec 2011
Posts: 21

Original Poster
Rep: Reputation: Disabled
I don't show any erhernet controllers when I do the lspci command. I do have a physical Ethernet port though. Now what?
 
Old 01-09-2012, 06:56 PM   #11
Tem2
LQ Newbie
 
Registered: Dec 2011
Posts: 21

Original Poster
Rep: Reputation: Disabled
Good news! My ethernet port was disabled in the bios. I enabled it and now the connection works. I'm writing this post from the laptop.

The next goal is to create a disk image of my existing system for backup and then to upgrade to a new version of Ubuntu. I'd like to start from scratch with the latest Ubuntu and follow your advice on the partitioning.

My response time is pretty slow on my ethernet connection. Will an upgrade on the os speed that up a little?

Right now I'm researching how to download Clonezilla and create a bootable flash drive. Any help would be greatly appreciated.
 
Old 01-09-2012, 09:03 PM   #12
Tem2
LQ Newbie
 
Registered: Dec 2011
Posts: 21

Original Poster
Rep: Reputation: Disabled
Ken,

I'm missing something, because I'm running into brick walls everywhere I turn.

This is what I would expect:

Creating a disk image in Ubuntu should be no more difficult than in a Windows based system. I run True Image or Paragon software, or any number of other apps which will do the same thing, which allows me to create an image of any partition, and save it to an external usb drive.

I tried installing Clonezilla. Apparently the program has to run from a bootable device. I have a usb flash drive, so I figured I'd try to install Clonezilla to it, using an app designed for that purpose called Tuxboot. I found the instructions to be very poorly written. You have given me very clear, very concise information and instructions which I greatly appreciate. I hit a dead end with Tuxboot, so I figured I'd Google "ubuntu disk imaging software".

Apparently there is a "dd" command that will probably do what I want. Maybe you can help me with that. Or help me download, configure and execute software that will allow me to save partition image files to an external usb drive. I can't boot from a usb drive, because then I won't be able to see my external drive. Maybe it's a configuration issue, or maybe that's just the way it works, but I can only see one usb port connected device at a time.

I'm sure that in a few years after I've become proficient with Linux I'll look back at my frustrations and laugh. I'm not there yet.

Thanks again!
 
Old 01-10-2012, 02:31 AM   #13
DanceMan
Member
 
Registered: Mar 2009
Location: Vancouver BC
Posts: 91

Rep: Reputation: 22
Quote:
2 working USB adapters on the laptop
If you have or can borrow an external usb hard drive or external cd or dvd burner, or best -- both, you could make Clonezilla work. I have not used the dd command but I think it makes an exact copy of the drive. Clonezilla will compact it by leaving out unused spaces. I've used it once to image a Windows partition, merge several partitions using partitioning programs and then reinstall from the image Clonezilla made. I used an external usb hard drive, and booted from an internal cd/dvd drive with a burned Clonezilla disk. The program is great, the documentation is sketchy, and it took me many tries to solve a problem getting the usb drive recognized. The answer for that was to plug in the usb drive after the initial linux boot and hardware config had finished (text in b&w) and just after the Clonezilla program began (colour screen).

You could undoubtedly boot from a usb stick and save the image to a usb hard drive. I'm sure there are some tricks to setting up a bootable usb stick with Clonezilla and I would suggest searching the Clonezilla forum for info on that subject.

As a plan B, on most recent laptops it is quite easy to change or install a wireless card. Most are under their own small cover on the bottom and have one edge connector and a wire to connect the antenna. IBM and HP have written code into their bios to make you buy their branded card with a line or so of code added and big price increase. I don't think Dell has. Older laptops took a mini-PCI card, recent ones use a mini-PCIe card. A little googling will let you ID them by the shape. The newer mini-PCIe are skinnier and less square. Used ones (people upgrade from G to N, or they come from dead laptops) can be $10 or so on craigslist. Broadcom has recently seen the light of linux drivers, but Intel wireless cards are usually foolproof for linux drivers and Ubuntu will pick them up right away. If you go this route, do some googling for a Dell manual or "wireless card and your model" and I'm sure you will find some instructions or a Youtube video that will help you.

Good luck.
 
Old 01-10-2012, 09:24 AM   #14
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Debian, OS X
Posts: 1,298

Rep: Reputation: 102Reputation: 102
Thumbs up

Quote:
Originally Posted by Tem2 View Post
I'm new to linux. Pretty decent understanding of windows based os, but I get the impression that that is unimpressive to you folk. I want to understand Linux basics, and I think a good place to start is to learn some disaster recovery stuff. How can i partition my drive and how can I make a disk image of my drive.
Hi Tem,

Try MondoRescue
http://linuxhelp.blogspot.com/2006/0...-disaster.html

I find it awesome.
 
Old 01-10-2012, 09:54 AM   #15
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,389

Rep: Reputation: 101Reputation: 101
I like good news! Is your wireless card also disabled in BIOS perhaps?

I have used Clonezilla from a disk but have not tried it from a USB flash drive. I have used g4l (which does not stand for Ghost for Linux because "Ghost" is trademarked by Symantec :-) from disk and flash drive. It is not as full featured as Clonezilla and it may not work depending on how your hard drive is partitioned and formatted. However, I have to ask - do your really need to image the hard drive in the laptop if you are planning to upgrade it to a newer version of Ubuntu? Could you simply copy your important data files from the laptop to a flash drive?

That said, the "manual" method of installing Clonezilla does not look too bad. http://clonezilla.org/liveusb.php#linux-method-b Let me know if you want to try that and I will work through it and see what pitfalls/tips I can pass along.

Yes, dd will copy a partition byte for byte. It is like the drive to drive clone feature in Ghost or True Image. It copies each byte on the source drive regardless - data or no data. The result will be the same size as the original. Not real handy for making a backup image.

You said in your most recent post
Quote:
I can't boot from a usb drive, because then I won't be able to see my external drive.
In order to image the hard drive partitions you need to boot from a different drive. When you boot from the Clonezilla or g4l or other flash drive it will be visible to the backup application. AND it will need to have enough room to write the image file.

Ken
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Full hard drive tape backup using cpio dsraju Red Hat 6 07-05-2011 01:09 AM
Cant restore my hard drive disk properly DuarteSilva Linux - Desktop 11 10-15-2010 04:30 AM
Linux full Hard disk backup or mirror charlestsai4001 Linux - Newbie 4 07-08-2010 07:54 PM
backup the RHEL5 server with Cpanel and create full system restore disk zaki Linux - Newbie 1 08-31-2009 12:59 PM
Backup/restore and/or cloning of a hard drive Ubuntu 7.10 taylorkh Ubuntu 3 02-02-2008 08:47 PM


All times are GMT -5. The time now is 12:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration