Re: [Hampshire] Hard disk failing
Don't see why would wouldn't be able to just dd the data to the new disk, assuming the new disk is larger. You can then use any partition manager tool to increase the size of the partitions to fill the new space. Worst case is it fails and you have to reinstall anyway... assuming you have the time, and since you had the time to create the image in the first place. (Well, the actual worst case is you dd the wrong disk and lose everything then panic and set your house on fire ;) ) On 24 November 2012 13:52, Tim Brocklehurst wrote: > On Saturday 24 Nov 2012 13:17:12 Kevin Safford wrote: > > gsmartcontrol reports that my hard disk is failing. > > > > I can still read and write to the disk, but I want to replace it before > > it's too late. I've not had to do anything like this before, so help! I > > have a new disk, ready and waiting. > > > > The failing drive is partitioned as: > > /dev/sda1 ext4/ 37.25 GiB > > /dev/sda3 ext4/home 424.63 GiB > > /dev/sda2 extended3.87 GiB > > /dev/sda5swap > > > > After the latest problems, I booted into recovery mode and ran fsck, > > accepting the default options, to tidy up orphan files. > > > > I then installed ddrescue, and put a copy of /dev/sda on an external > > hard drive: > > > > sudo ddrescue /dev/sda /media/rescue/sda_rescue rescue.log > > > > That gives me a 500 GB file. I've also got (stored separately), gz > > backups of /home. > > > > From some of the messages I got when installing ddrescue (from memory, > > that there's no version information for various packages, assuming they > > are not installed), I've lost some of the synaptic information. > > > > What's my best way forward from here? When I've swapped disks, can I use > > dd to write my rescued information to the new hard drive? > > > > If so, is it advisable to do this, or is it better to do a clean > > install, and copy over /home from a backup? > > > > If I do a clean install, what's the easiest way of getting a list of > > software that I've installed through synaptic, and reinstalling it? > > > > I'm running Mint 13 Mate 64-bit. > > If you don't have too much stuff configured (or time is not an issue) I > would > opt to do a clean install on the new disk and then copy /home from the > existing disk. > > On debian type systems you can use "dpkg --get-selections" as root to show > installed packages. If you diff this against a clean install then you > should > get a managable number of packages to re-install. > > You can also use tar to archive the root partition (ie. tar > --one-file-system - > cvf root.tar /) and then restore it on your new disk. > > On using dd, if you dd a whole device (/dev/sda), then you store the whole > geometry. If you dd /dev/sda1, then you only store the filesystem and you > can > mount this with loopback options later, which is more flexible. Chances are > that when you change disks you would usually take the opportunity to put > more > storage in. Therefore, recreating the exact device may not be what you are > after. > > Hope this helps, > > Tim B. > -- > Hampshire Linux User Group Chairman > > -- > Please post to: Hampshire@mailman.lug.org.uk > Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire > LUG URL: http://www.hantslug.org.uk > -- > -- Michael Daffin -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] Hard disk failing
On Sat, 24 Nov 2012 13:17:12 +, kevin.saff...@gmail.com said: > What's my best way forward from here? When I've swapped disks, can I use > dd to write my rescued information to the new hard drive? Here's how I would do it (so "best" for me; not necessarily "best" for you). Put both disks in system. Boot from favourite rescue CD. Assume /dev/sda is your failing disk and /dev/sdb is the new one. Be CERTAIN of this otherwise you'll lose data. # Replicate the partition table: sfdisk -d /dev/sda|sfdisk /dev/sdb # Make the filesystems on the new disk: for a in 1 3;do mke2fs -t ext4 /dev/sdb$a;done # Make the swap partition: mkswap /dev/sdb5 # Create two mount points: mkdir /to /from # Mount the first pair of partitions mount -r /dev/sda1 /from mount /dev/sdb1 /to # Copy, preserving metadata tar -C /from -cf -|tar -C /to -xvf - # Unmount umount /to /from # Repeat above to copy all data partition (just root and home in your case) Shut down, remove old disk, leave new disk, boot rescue CD and write boot block. Lots of ways of doing that, some of which are distro-dependent and they will vary depending on whether you're using lilo, grub 1 or grub 2. If you need specific instructions, shout. -- We're looking for smart Linux people: http://www.tiger-computing.co.uk/jobs -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] Hard disk failing
On Saturday 24 Nov 2012 13:17:12 Kevin Safford wrote: > gsmartcontrol reports that my hard disk is failing. > > I can still read and write to the disk, but I want to replace it before > it's too late. I've not had to do anything like this before, so help! I > have a new disk, ready and waiting. > > The failing drive is partitioned as: > /dev/sda1 ext4/ 37.25 GiB > /dev/sda3 ext4/home 424.63 GiB > /dev/sda2 extended3.87 GiB > /dev/sda5swap > > After the latest problems, I booted into recovery mode and ran fsck, > accepting the default options, to tidy up orphan files. > > I then installed ddrescue, and put a copy of /dev/sda on an external > hard drive: > > sudo ddrescue /dev/sda /media/rescue/sda_rescue rescue.log > > That gives me a 500 GB file. I've also got (stored separately), gz > backups of /home. > > From some of the messages I got when installing ddrescue (from memory, > that there's no version information for various packages, assuming they > are not installed), I've lost some of the synaptic information. > > What's my best way forward from here? When I've swapped disks, can I use > dd to write my rescued information to the new hard drive? > > If so, is it advisable to do this, or is it better to do a clean > install, and copy over /home from a backup? > > If I do a clean install, what's the easiest way of getting a list of > software that I've installed through synaptic, and reinstalling it? > > I'm running Mint 13 Mate 64-bit. If you don't have too much stuff configured (or time is not an issue) I would opt to do a clean install on the new disk and then copy /home from the existing disk. On debian type systems you can use "dpkg --get-selections" as root to show installed packages. If you diff this against a clean install then you should get a managable number of packages to re-install. You can also use tar to archive the root partition (ie. tar --one-file-system - cvf root.tar /) and then restore it on your new disk. On using dd, if you dd a whole device (/dev/sda), then you store the whole geometry. If you dd /dev/sda1, then you only store the filesystem and you can mount this with loopback options later, which is more flexible. Chances are that when you change disks you would usually take the opportunity to put more storage in. Therefore, recreating the exact device may not be what you are after. Hope this helps, Tim B. -- Hampshire Linux User Group Chairman -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] OT: broadband router with DNS....
On Thu, 22 Nov 2012, c...@spamcop.net wrote: Okay, so in the light of the many such comments, I've ordered a new router, and will go the path of a third party firmware. Although, I'll probably go with DD-WRT, just because there seems to be slightly better documentation for the things I want - but we shall see I'd be interested to know what you bought and from where, and whether you are happy with it once it arrives. My Wifi router is old and originally cheap and is becoming increasingly flaky. So I'd like to replace it before it dies completely and bassed on this thread sounds like DD-WRT is the best way for me to go. Andy -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
[Hampshire] Hard disk failing
gsmartcontrol reports that my hard disk is failing. I can still read and write to the disk, but I want to replace it before it's too late. I've not had to do anything like this before, so help! I have a new disk, ready and waiting. The failing drive is partitioned as: /dev/sda1 ext4/ 37.25 GiB /dev/sda3 ext4/home 424.63 GiB /dev/sda2 extended3.87 GiB /dev/sda5swap After the latest problems, I booted into recovery mode and ran fsck, accepting the default options, to tidy up orphan files. I then installed ddrescue, and put a copy of /dev/sda on an external hard drive: sudo ddrescue /dev/sda /media/rescue/sda_rescue rescue.log That gives me a 500 GB file. I've also got (stored separately), gz backups of /home. From some of the messages I got when installing ddrescue (from memory, that there's no version information for various packages, assuming they are not installed), I've lost some of the synaptic information. What's my best way forward from here? When I've swapped disks, can I use dd to write my rescued information to the new hard drive? If so, is it advisable to do this, or is it better to do a clean install, and copy over /home from a backup? If I do a clean install, what's the easiest way of getting a list of software that I've installed through synaptic, and reinstalling it? I'm running Mint 13 Mate 64-bit. -- Kevin Safford -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
[Hampshire] Museum piece -- Axis NPS 550 parallel port print server
Hello folks Before I chuck it out, does anyone have a use for an Axis NPS 550 parallel port print server? Free to a good home. cheers Chris -- Chris Dennis cgden...@btinternet.com Fordingbridge, Hampshire, UK -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --