Jump to content

Wikipedia:Reference desk/Archives/Computing/2008 July 28

From Wikipedia, the free encyclopedia
Computing desk
< July 27 << Jun | July | Aug >> July 29 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


July 28

[edit]

Partition

[edit]

Ok, I am running a LiveCD of Xubuntu 8.04.1 . On my hard drive, I have the Windows XP OS. On my LiveCD, there is an application called Gparted. I would like to install Xubuntu on part of my hard drive and have the rest for Windows. However, I already have alot of stuff on the hard drive that I need to keep. My question is, can I partition from a LiveCD and if I can and do, would it harm Windows? Thank you, Ζρς ι'β' ¡hábleme! 03:39, 28 July 2008 (UTC)[reply]

Try installing and you'll see that you can resize your Windows partition to make space for Linux using a simple slider or do it manually for more complex layouts. Linux is more user friendly than you think. --antilivedT | C | G 04:18, 28 July 2008 (UTC)[reply]

Although I can personally vouch for the greatness of GParted you should always backup your hard drive before doing any parition work. There's the .01% chance that something could go horribly wrong, even though GParted has specific protections against this. --mboverload@ 05:48, 28 July 2008 (UTC)[reply]

A problem with wireless card

[edit]

I have a wireless internet card that is made by D-Link it is a DWL-G520m. I am running windows XP. Here's the problem, whenever I attempt to open the program that was installed with it I get an error "athcfg11.dll was not found". I know the fix for this is probably a reinstall however I cant seem to find a download that works on my computer. I keep being linked to this page. ftp://ftp.dlink.com/Wireless/dwlg520/Driver/dwlg520_driver_248.zip/ When this page opens nothing happens on my computer. I normally wouldn't care because I can still browse the internet but it sometimes fails to work properly and, when I attempt to run an ICS connection I get a DNS error. any help with this would be appreciated. -Thanks —Preceding unsigned comment added by 75.168.50.251 (talk) 04:47, 28 July 2008 (UTC)[reply]

Have you tried uninstalling the drives, removing the card from the computer and then re-inserting the card. wireless internet cards really should work on generic windows pre-installed drivers so it may be that by removing and re-inserting the card it'll re-start the 'plug and play' style install. Or it could be that the card has the software pre-installed on the card-itself (why don't more card/enhancement firms do this??) 194.221.133.226 (talk) 08:01, 28 July 2008 (UTC)[reply]

SSH on the ASUS EeePC

[edit]

Does anyone know if the ASUS Eee PC comes with SSH installed so that one can directly type ssh -X username@example.com to get a connection with graphics forwarding? (Is there even a terminal available?) If it's not installed, is it easy to do, such as through a package manager? —Bromskloss (talk) 10:33, 28 July 2008 (UTC)[reply]

I googled around, and the Eee PC does indeed come with ssh installed. I haven't tried it or anything, but there should be no reason why X forwarding shouldn't work. ADFSGL (talk) 12:20, 28 July 2008 (UTC)[reply]
If not, there are a variety of windows SSH clients, including PuTTY, and X-Forwarding systems, such as Xming. Nimur (talk) 15:06, 28 July 2008 (UTC)[reply]
The Eee PC runs GNU/Linux, for which there is of course solid support for SSH and X forwarding. I just wondered if it was preinstalled or easy to install on the particular system that the Eee PC comes with. —Bromskloss (talk) 16:09, 28 July 2008 (UTC)[reply]
do NOT use the ssh preinstalled on the EEE. It has the notorious Debian security vulnerability [1] that affects all Debian-based distributions from that era. You have to make sure that you are running an updated openssl lib or all your openssl and openssh keys and sessions are COMPLETELY compromised. 207.241.238.217 (talk) 20:57, 28 July 2008 (UTC)[reply]
Oh, don't that kind of things get updated automatically? Or manually with apt-get? —Bromskloss (talk) 21:15, 28 July 2008 (UTC)[reply]
The updates are not applied automatically. Maybe apt-get update gets them but I haven't verified this. 207.241.238.217 (talk) 01:33, 29 July 2008 (UTC)[reply]

Security with broadband

[edit]

Hi, I've just signed up for broadband with Amnet (in Australia), with a NetComm NB6, wired ethernet router. The user manual for the router keeps discussing security levels and firewalls. I used to have dialup, and never heard anything about the need for firewalls on my system, because I thought that was all taken care of by the isp, and unless you had the capacity to act as a webserver, there was no way for anyone to break in.

  • Firstly: Is this right about dialup, is broadband less secure, and what can you do (beyond ramping up all of your security settings) to stop people from getting in?
  • Secondly: Should I change the password for the router itself, or does this only protect it from someone altering the settings with physical access to the computer (ie. who can sit and the keyboard and alter them manually)? 202.89.166.179 (talk) 12:29, 28 July 2008 (UTC)[reply]
Dial-up wasn't safe either *grin*. Whilst in theory an ISP could filter inbound traffic it's unlikely; it would be hard to manage and people tend to expect to have an open net connection. Broadband isn't less secure, it's the same as dialup, it's just that with dialup you weren't connected all the time, so the likelihood of an attack went down. Consumer routers these days tend to have one built in; your router does Network Address Translation by default so that's a good start. And yes, changing the router password is a good idea; normally people can't use that password from outside the network, unless the router is configured to allow that, but better safe than sorry. --Blowdart | talk 12:50, 28 July 2008 (UTC)[reply]
This is a very good point, a NAT router (like the one you got from your ISP) is an excellent inbound firewall, and that alone will give you great protection from incoming attacks. As for changing the password, that's a very good idea. There are some (mostly theoretical) attacks whereby a website can get in and monkey around with your router if it can guess the password, and you want to avoid that. In general, it's always a good idea to change default passwords for anything, really.
As for software firewalls, the one that comes built-in with Windows XP Service Pack 2 is all you really need (you can pay a kings ransom to Norton or something, but their firewalls are essentially not going to do much more). With the Windows firewall and a NAT router, you're pretty much safe from incoming attacks.
However, that does not mean your computer is immune to viruses and trojans and such! The standard security advice applies here: don't install anything you've gotten from the web if you don't trust the source, don't open email attachments or links you get from an email, and don't surf the seedier parts of the internet. And most importantly, remember to keep your machine updated! If you do all that, you're probably safe from the bad dudes online. Cheers! ADFSGL (talk) 15:46, 28 July 2008 (UTC)[reply]

Hard drive issues.

[edit]

While working on my Compaq Presario 1080 with Windows 95, I accidentally set the active partition to a non-dos partition that is 51 MB in size. So when I started my computer again, it said "Missing Operating System". When I saw this I was thinking, "Hey, no big deal just fix it with a bootable floppy." Below is my process and errors.

A:\FDISK
Do want to enable large disk support » Y
I then chose option 2 » set active partition
I then chose drive C:\ (partition 2) as my active partition.
Then I pressed esc to continue and esc again to exit
I then get the error "Error reading fixed disk"

Then I went and tried a different tactic:

A:\FORMAT C:
It chugged along and then toward the end it gave me the error "Error writhing partition table. Format 
terminated."

Then I tried deleting all partitions and making one large active partition:

A:\FDISK
Large disk support [Y]
Chose option 3
Chose option 4
Deleted all non-dos partitions
Back at the main screen chose option 3 again
Chose option 1
Deleted all Pri-dos partitions
Back at the main screen chose option 1
Chose option 1
Said yes to the info
Then the fdisk said the computer must restart for changes to take effect.

Restarted then ran FDISK from the floppy to see it changes had taken effect and they had not. What must I do to get the computer working again?

70.233.165.195 (talk) 13:33, 28 July 2008 (UTC)[reply]

Maybe you have a bad copy of FDISK ? It certainly should be able to do what you attempted. BTW, I like the "writhing partition table". :-) StuRat (talk) 14:41, 28 July 2008 (UTC)[reply]
Resolved

I'm looking for a suitable article to link to for wiki-linking the phrase 'context sensitive' specifically in the case of user-interface context-sensitive input - eg context sensitive responses to button pressses in video games..

Can anyone find a suitable page?87.102.86.73 (talk) 17:41, 28 July 2008 (UTC)[reply]

I'm not sure what you mean. Maybe you're looking for context-sensitive? Admiral Norton (talk) 18:27, 28 July 2008 (UTC)[reply]
Context sensitive should work now, too. Admiral Norton (talk) 18:28, 28 July 2008 (UTC)[reply]
An article that covers 'context sensitive' in the context of computers (specifically computer games) eg I press the 'use' button and the computer decides whether or not I meant throw,drop,eat etc?87.102.86.73 (talk) 18:56, 28 July 2008 (UTC)[reply]
You are looking for Context-sensitive user interface - an article which does not exist, yet. Why don't you start it? -- kainaw 19:26, 28 July 2008 (UTC)[reply]
Is there definately nothing similar?
One problem I would have here would be getting references. Any hints.87.102.86.73 (talk) 20:00, 28 July 2008 (UTC)[reply]
I'm surprised no one has made any jokes about Conker's Bad Fur Day yet. --71.98.25.85 (talk) 20:40, 28 July 2008 (UTC)[reply]
OK you asked for it :User_talk:87.102.86.73#Context_Sensitive_User_Interface_Design - would anyone care to look it over, and if suitable make the article. Otherwise tell me where I went wrong.?87.102.86.73 (talk) 04:25, 29 July 2008 (UTC)[reply]

Update Context sensitive user interface now exists - if anyone has any notable info. for the article - specifically history of., classic or state or the art examples, etc etc please leave a message for me or add the info yourself..87.102.86.73 (talk) 12:30, 29 July 2008 (UTC)[reply]

{{resolved}} (please continue discussion if you wish}}

Making Dvd compatible

[edit]

I have an avi file that I want to make compatible so I can play it on the dvd player not on the lab top . Now I started the compatibility application but the process doesn't seem to be moving at all, is there some other way to do it other than to rely on windows? And what occurs during this process?Why do CD-R, DVD-R and DVD+R require this process while other disc formats don't?Bastard Soap (talk) 18:29, 28 July 2008 (UTC)[reply]

I think you've misunderstood what's being done, or I'm misunderstanding your question. CD-Rs and DVD-Rs and DVD-RWs , etc. etc. are just disc formats. Within the scope of your question, the type of disc is really irrelevant. If your DVD player doesn't play AVI files (many do these days), it will need to have the video converted into a format it can understand, such as .VOB files (on DVDs) or .DAT files (on CDs). Most burning programs come with a utility that will convert the AVI into the the format of your choice, but that's really a separate process from the actual burn to disc. If you find that you're converting a lot of files from AVI, I'd suggest you just get a cheap DVD-player that can play DivX AVIs (it will be advertised right on the box) as converting the video almost always leaves you with a lower quality picture, especially if you're using the conversion tool that comes with the burning program. If you're just concerned that the process is taking a long time, then I'll warn you that video conversion can be a huge chore for older machines and can easily take hours. Hope this helps. Matt Deres (talk) 20:10, 30 July 2008 (UTC)[reply]
Video DVD players require the the video to be encoded at specific resolutions and format. see here: DVD-Video. AVIs can contain all sorts of different codecs and resolutions. --70.167.58.6 (talk) 20:39, 30 July 2008 (UTC)[reply]

Make it go faster, damn it!

[edit]

At my local libary there are many computers and they all connect through the interent via a proxy server, and through my investigations I have found that the same server and indeed Ip address is used accross almost every libary in my area. Now, for the past three or so years I've have been going to the libary and downloading files via bittorrent (utorrent) at a rate of about 10GB per day. But recently the download speed has dramatically droped from around 7mbps to 800kbps. I feel that someone on the other end (the proxy server admin maybe) is limiting my downloads. How can I bypass these restrictions? This problem is not one I can complian to the libary about as I probablly shouldn't be mass downloading there and at present the connection speed is not low enough to troubble the average everyday internet user, so nobody else will be complaining. ZigZap (talk) 20:29, 28 July 2008 (UTC)[reply]

I'll be honest and say yes there is a way, but I am not sure if it is legal to even do as it is not your personal network. RgoodermoteNot an admin  21:28, 28 July 2008 (UTC)[reply]
Without knowing the system setup, it is impossible to know if there are any workarounds to the speed limitation. Why don't you ask the system administrator about the speed change? They may have intentionally put a Quality of service limitation of some type to discourage high-speed downloading; or, there may be a system failure which needs to be fixed. Nimur (talk) 22:18, 28 July 2008 (UTC)[reply]
I suggest you find some massive download that the librarians wouldn't mind (like your own copy of Wikipedia, perhaps ?). That way, when you complain that "it doesn't work when I do X", they won't say "then don't do X". StuRat (talk) 22:46, 28 July 2008 (UTC)[reply]
Please Rgoodermote, tell me. Or at least link to a website that says how to do it. You can't just announce that there is a way and then leave me hanging! ZigZap (talk) 10:46, 29 July 2008 (UTC)[reply]
He's not really obligated to. It's like, if you asked if there are drug dealers, he says yes, but won't tell you who. He could become an accessory to a crime for all we know. --Wirbelwindヴィルヴェルヴィント (talk) 18:04, 31 July 2008 (UTC)[reply]

Upgrading Computer?

[edit]

Okay so here are the specs for my computer, which I want to upgrade. I firstly want more RAM (and btw- would my computer be compatible with high density RAM? My computer only supports DDR1 RAM as of now), and I'd also like to know if you guys can think of any cheap but useful or necessary upgrades that would help the performance of my computer. Lastly, I'm planning on buying all of the upgrades from Newegg.com. Thank you for your help and suggestions! --71.98.25.85 (talk) 20:32, 28 July 2008 (UTC)[reply]

The link didn't work for me, so I don't know your exact specs, but you'll want to get DDR2. DDR3 isn't worth it at the moment. I'd recommend a Core 2 Quad, perhaps the Q9450, I believe it's called. I think it's about $330 on Newegg, but don't forget to also check Tigerdirect.com. As for a video card, probably an 8800GT would be the best bang-for-the-buck. Useight (talk) 22:00, 28 July 2008 (UTC)[reply]
DDR2 RAM won't work on a DDR1 motherboard. You would need to get a new motherboard and CPU, which starts to get a bit expensive. Most people don't need a faster CPU. Try running and minimizing Windows Task Manager; it will show a little tray icon with your current CPU usage. If it's frequently at 100% then a faster CPU may help you. If it's any lower (like 95%) then the bottleneck is elsewhere and a faster CPU won't help at all. Adding RAM will probably noticeably improve performance. What sort of performance (or other) problems are you having, by the way? -- BenRG (talk) 23:15, 28 July 2008 (UTC)[reply]
Ahh, dang, I couldn't get the link for my specs to work...but thank you both for your suggestions. On the Belarc Advisor report for my computer it says the bus clock is 200 megahertz, which I believe is the speed for the RAM, correct? So I need 200 megahertz speed RAM? And lastly, how do I know if my computer will support high density RAM? --71.117.43.247 (talk) 16:37, 29 July 2008 (UTC)[reply]
Any kind of DDR1 RAM should work; it will have names like "PC-2700" or "PC-3200" (not "PC2-", that would be DDR2). Also, it needs to be DIMM (larger form factor for desktops) or SODIMM (smaller for laptops) depending on which your machine takes. And it can't be higher capacity than your machine supports (for example your machine might be limited to 512MB DIMMs and a 1GB DIMM won't work). The four-digit number after the PC- doesn't matter much. It's the speed of the RAM, but you probably wouldn't notice the difference. More RAM helps a lot, faster RAM not so much. I don't know what you mean by high density RAM. -- BenRG (talk) 03:51, 31 July 2008 (UTC)[reply]

ai computational complexity

[edit]

I'm trying to write a Pentago-playing AI. The problem is that there are 288 possible moves to make (6x6 grid * 4 blocks to rotate * 2 directions to rotate). And I have to check if the human could win, so that's another 288 moves. So my AI has to look through 576 moves to decide where to go. And if I want to look ahead a move, that's 331,776 possibilities. Two moves ahead? A whopping 191,102,976! I have the magic constant set to one move ahead and there's a full 2-second delay before the AI makes a move.. two moves ahead basically hangs.

So how do chess engines and such handle so many combinations? It hardly seems like Pentago is more complex than chess.. am I wrong to use recursion? I'm working in C++, is recursion just too expensive? 76.106.15.180 (talk) 21:17, 28 July 2008 (UTC)[reply]

See Computer chess for an overview of techniques to reduce the search space. alpha-beta pruning will be especially useful. --tcsetattr (talk / contribs) 21:42, 28 July 2008 (UTC)[reply]
Ooh, alpha-beta pruning looks nice! I just "started writing" and ended up with an algorithm that:
For every possible move:
  • checks the board for a winner
    • if in winning state, make that move (results in a victory or a blocked victory)
    • if not in winning state:
      • make that move for the ai, recurse to step 1, then undo that move
      • make that move for a human, recurse to step 1, then undo that move
Pretty much as brute-force as possible, though it does beat the official pentago engine :D. I'll see if I can eliminate more cases than "that move" being occupied. 76.106.15.180 (talk) 01:06, 29 July 2008 (UTC)[reply]
The "brute force" approach of looking at every possible move only works for the simplest of games, like tic-tac-toe. For anything more complex, you need to program the computer to mimic human thought patterns as closely as possible. How would you decide what a good move is in this game ? Try to program the computer to use the same logic. StuRat (talk) 22:42, 28 July 2008 (UTC)[reply]
Because of the symmetry of the board, there are not as many moves possible as it would appear. For example, placing a marble on any of the four corners of a blank board is equivalent to placing it on any of the other corners. Just rotate the entire board. So, right off the top, you've pruned 75% of the seemingly infinite number of moves possible. Now, you can think of pattern matching. What moves are actually possible. Can you have a board with 8 black marbles and 3 white? No. Again, you've reduced the number of patterns that can be matched. So, now you should see that pattern matching is looking better. How can you cheaply represent a board? Each hole had 3 options (black, white, or empty). You are looking at a tertiary value per each of the 36 holes. That is a HUGE number, but we've already stated that only 25% of them are needed to represent all 100% of the possible layouts and most of those 25% are not valid anyway. So, from this point, you should see it possible to start a state tree. You do a depth-first search down each branch of the tree. If it ends with "human wins", you prune it. You'll end up pruning large subsections of the tree until you have a tree that always ends in draw or win. Is it possible to always win? Probably not. Creating the tree will take a very long time, but when it is done your AI program will be very simple. Just locate the state in the tree (rotating the entire board as necessary) and choose a move that eventually leads to a win state. -- kainaw 23:11, 28 July 2008 (UTC)[reply]
(ec with below) Deep Blue relied mostly on brute force, actually. I don't think its approach to chess resembled a human's much at all. The article has some interesting things to say about this in the section Computer_chess#Brute_force_versus_selective_search. I think Computer Go is more interesting from an AI perspective because the branching factor is much higher, which makes brute force too slow. -- BenRG (talk) 23:38, 28 July 2008 (UTC)[reply]
Chess doesn't have nearly as many moves per turn. So if you use a typical chess AI with minimax and alpha-beta pruning you're not going to get nearly the depth a chess program would work. Check out the article on Computer Go for the problems you're going to face with this project. APL (talk) 23:28, 28 July 2008 (UTC)[reply]

Subfolders and AppleScript

[edit]

Hi. I am trying to make an AppleScript to hide all items in a folder and its subfolders. So far, I've got


tell application "Finder"

try set listOne to ((entire contents of (choose folder)) as alias list)

set countOne to length of listOne

set countOne to length of listOne

repeat with i from 1 to countOne

set theItem to (item i of listOne as text)

set TheName to name of (theItem as alias)

if character 1 of TheName is not equal to "." then

set name of item theItem to ("." & name of item theItem)

end if end repeat

end try

end tell


but that will only hide things inside the chosen folder. If I replace "entire contents of (choose folder)" with "entire contents of folders of (choose folder)" it ignores the contents of the chosen folder, going only for the subfolders, and if I put "every item of entire contents of folders of (choose folder)" it still ignores the contents of the chosen folder and hides the items in the subfolder. What am I doing wrong? How can I make it hide both files and folders? Thanks a bunch. Ilikefood (talk) 21:24, 28 July 2008 (UTC)[reply]

Raw (dd) copy of smaller to larger disk.

[edit]

Scenario: I'm using a linux machine, where the main disk with linux is /dev/sdb. Let's assume that I have also connected a second disk (400GB) taken out of a healthy windows machine, recognized as /dev/sda, which has a single NTFS partition. Finally, a third disk (500GB) is connected, which is unformatted, and recognized as /dev/sdc.

Question: If I first use dd to make a raw disk image of the windows disk (dd if=/dev/sda of=my.image bs=1024), and then copy the image (dd if=my.image of=/dev/sdc bs=1024) to the unformatted, larger disk, will the larger disk then be functional (i.e. bootable as the main windows disk in the machine where its contents came from, or mountable in linux, or readable in some other way)?

Motivation: The scenario above does not describe what I'm trying to do, but I need to know if it would be expected to work, in order to interpret the results of an attempt at data recovery.

The real problem: I'm trying to help some friends recover data from a crashed harddisk. I have mounted the disk on a linux machine. It is seen by the bios, and cfdisk and sfdisk report no problems. However, when I try to mount it (mount /dev/sda1 /mnt/bad-disk), I get the message

$MFTMirr does not match $MFT (record 0).
Failed to mount '/dev/sda1': Input/output error
NTFS is either inconsistent, or you have hardware faults, or you have a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows TWICE. The usage of the /f parameter is very
important! If you have SoftRAID/FakeRAID then first you must activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for the details.

So I checked if there are damaged sectors:

dd if=/dev/sda of=/dev/null bs=1024.

dd terminated after about 3 GB, reporting damaged sectors.

I then used dd_rescue, to get an idea of the extent of the damage:

dd_rescue -A -v /dev/sda /dev/null

(-A is replace damaged sectors by zeroed sectors of the same sice, -v is verbose). The result was that only 36 sectors were unreadable, some of which might be recoverable by reading the bad parts in reverse, and patching them into the main image. So my plan is this: use dd_rescue to make a disk image, with the unreadable sectors replaced by zeroed sectors, and then dd the image to an empty, healthy disk, and hope that it is mountable in either linux or windows. The problem is, I don't have a disk with the same geometry as the damaged one. I do, however, have a larger disk.

Other suggestions on how to recover the data would of course also be appreciated. In particular, advice about software that is able to reconstruct a physically OK but logically faulty NTFS disk would be most welcome. Thanks, --NorwegianBlue talk 23:15, 28 July 2008 (UTC)[reply]

I have done this far too many times so trust me here
First, go to the HDD manufacturer's website and download their diagnostic floppy/CD. Trust me - just do it. They can do a proper fix of all bad sectors and do a proper test of all the mechanics. This should be your first step with any hard drive that has a physical problem like yours. Once it is done scanning see if it boots the drive or if you can mount it. Chances are that there is extremely little file damage
Now you can try your dd trick - which SHOULD work unless your drive is so screwed even those manufacturer boot CDs can't fix it. Then the only thing you can do is try to bang the disk against stuff and put it in the freezer to get really cold.
If it will not boot Windows from the new drive slave the drive to another Window's install and use R-Studio NTFS if there are files missing. Only 50 bucks and the best recovery software I know of. If you want a free - but still great solution try the Ultimate Boot CD for Windows. It is free but requires an XP cd to build it. Every computer guy should have this in their bag. I PERSONALLY endorse it. It has similar free tools - masses of them.--mboverload@ 01:28, 29 July 2008 (UTC)[reply]
Thanks a lot for your advice, mboverload. It's a Maxtor disk, so Seatools would be the program to use. I'll try it, and if it doesn't succeed, try the dd route, and check out the tools you recommend if it still isn't mountable. These things tend to take time, and mine is limited, so by the time I'm finished, this thread may have reached the archives. Therefore, I'll write a message on mboverload's talk page when I'm done, reporting whether I succeeded.
Meanwhile, I'm still interested in hearing from anyone who have tried doing a raw disk copy of a smaller to a larger disk, or who know for a fact that this works, and that the remaining space is flagged as free space, as one would expect. --NorwegianBlue talk 18:00, 29 July 2008 (UTC)[reply]
I've done it a few times when replacing a smaller hard disk with a larger one. Every time, though, I copied one partition at a time, rather than the full-disk copy that you're trying. Here are the steps I did:
  1. Partition the new disk so it has one partition that is exactly the same size as the partition you're trying to copy
  2. Use dd to write the data to the new partition. You can do either a partition-to-partition copy (dd if=/dev/sda1 of=/dev/sdb1) or a file-to-partition copy (dd if=/home/myimage of=/dev/sdb1)
  3. Do any neccessary repairs to the filesystem.
  4. Mount the new partition to make sure everything worked correctly.
  5. At this point, if you're using a growable filesystem (ext2/ext3 are, FAT isn't, I don't know about NTFS), you can enlarge the partition and then enlarge the filesystem to fill the available space. Alternatively, you can create a new partition out of the empty space.
If you've got an image of the disk, you can use Linux's loopback filesystem features to use it as if it were an actual physical disk. --Carnildo (talk) 21:59, 29 July 2008 (UTC)[reply]
Thanks!. This was very useful information. I like Partimage for backups, but have been a little worried as to what would happen if I had to restore to a disk with a different geometry. Another tool to achieve what you describe, is the Seagate Disk Wizard (works if there's a Seagate or Maxtor disk connected). It does exactly what you describe in one step, including resize the partitions (fat and ext3 also). I used it recently, but don't remember whether I had to use the Super Grub Disk to boot into linux, and do a grub-install to get grub working. The program warned that I would need a bootable medium to get in touch with linux, but as far as I recall, it wasn't necessary. Seagate disk wizard is a wonderful tool - when it works. I was unable to convince it to configure the partition sizes manually (but heck - it did a good job at resizing proportionally), and I was unable to successfully clone an IDE disk to a SATA disk. --NorwegianBlue talk 07:20, 30 July 2008 (UTC)[reply]
The GParted live cd will expand NTFS volumes. I've done it. It is very picky though - if it detects any problems it'll say "fogettaboutit". Which is what it should do! --mboverload@ 02:56, 30 July 2008 (UTC)[reply]
I've succeeded in rescuing the entire disk without doing any of the above! When I added an additional IDE disk to the PC, the defective SATA disk suddenly started working. I will do some additional diagnostics in the weekend, in order to see if this is reproducible, and understand what happended. I'll post the details on mboverload's talk page. Thank you, mboverload and Carnildo, you have taught me a lot --NorwegianBlue talk 07:35, 30 July 2008 (UTC)[reply]