This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Technology & Calculator Open Topic subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Computer Tech Support => Technology & Calculator Open Topic
Author Message
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 24 Nov 2007 06:36:07 pm    Post subject:

gparted will tell you the names.


It is excellent for resizing the partitions.

If you wish to clone windows to a larger drive, use gparted to get the drive names.

Next, I would use dd to copy the MBR and sfdisk to copy the partition table... probably not necessary. Then ntfsclone to copy the data.

Finally, when you are all done, ntfsresize.

Serriously, do yourself a favor.

Read documentation on all of the following and read tutorial's on their use:

gparted
partimage
dd
fdisk (The Linux/Unix one)
sfdisk
ntfsclone (Clones NTFS Partitions not Drives)
ntfsresize (Resizes NTFS file-systems to be less-than/equal-to the size of partition [container] they are within).

Side Note:
If you delete a partition and create it again with identical parameters, the data is still there and unaffected!... YOU MUST START AT SAME CYLINDER and end at greater than or equal too the cylinder used before otherwise you would be truncating the partition boundary). You must also avoid overlapping any other partitions!

When you increase the size of a filesystem, two things happen:
1. The starting point stays the same, but the ending point is changed to make it further away from the starting point (more cylinders... more space)
2. The file-system within the partition is resized with a specific filesystem dependent/aware reiszer. This means that the method for resizing an NTFS partition is different than a FAT or EXT3.

When you shrink:
1. The files and data are moved near the beginning of the partition leaving the free space near the end.
2. The filesystem is changed to have new boundaries set. This is filesystem dependent. For example ntfsresize works for NTFS only and something different for FAT32, EXT3, or UFS
3. There is now a large gab between the end of the file system and the end of the partition. The partition table is updated to indicate that the end of the partition is closer to the end of the file system... This means that the previously used area becomes unallocated/unpartitioned space. Obviously to use it, another partition can be added.

Just read the documentation. It is mostly automated.

For it to work properly, all you need to do is get a proper copy of the MBR, OS Boot Loader/Boot Sector, and an intact partition table with an undamaged filesystem that has the proper OS and data.


Last edited by Guest on 21 Jan 2008 03:27:47 pm; edited 1 time in total
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 18 Jan 2008 02:53:50 am    Post subject:

Okay, I'm going to try it this weekend. Basically, I'm supposed to...


1. Install new harddrive. Boot from the Live CD
2. Copy over the MBR and Partitions...
__a. dd if=/dev/sda of=.drive.mbr bs=512 count=1 (Creates a file with the MBR in it)
__b. sfdisk -d /dev/sda > ./partition.table (Dump partition table for later)
__c. Open partition.table and change all "sda"s to "sdb"s.
__d. dd if=./drive.mbr of=dev/sdb (Copy MBR to new disk)
__e. sfdisk /dev/sdb < partition.table (Retrieve partitions table)
3. Open fdisk to double-check size, type, flags, and other parameters are identical
4. Clone with ntfsclone
5. Resize with ntfsresize
6. Use fdisk to get the starting point and boot flag, delete and select the primary sector
7. Create a new primary partition. Set starting point & cylinder number. Take whatever ending point it offers.
8. Change the partition to type 07h NTFS. Select A to make it a bootable partition
9. Maximize the partition size using ntfsresize /dev/sdb1
10. Shutdown, remove the old drive, replacing it with the new drive. Try to boot windows
11. Open boot.ini. Change the drive number to be the second hard drive (using device man). Save (comment out?) the original setting.
12. Swap in the old drive again. Wipe the drive
13. Install Ubuntu on the blank disk. The bootloader will ask to boot Linux or Windows.
14. Tell windows it's one the new drive. The Microsoft bootloader knows what to do.
* At any time I can use gparted to find the drive names
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 21 Jan 2008 03:46:50 pm    Post subject:

Yes, that is correct.

Number 6 should be:
6. Use fdisk to get the starting cylinder, and then delete the primary partition.
(You don't need to get the boot flag. Just know you need to set it or it won't boot)

___________

10. Shutdown, remove the old drive, replacing it with the new drive. Try to boot windows
11. Swap in the ONLY the old drive (OR BE CAREFUL) and wipe the old drive or copy at least 512 bytes of 0's to the beginning of the drive to wipe disk label, partition table, and master boot record. dd if=/dev/zero of=/dev/old_drive_device count=1 bs=512
12. With the old blank drive installed as the primary drive and the new drive with Windows on it installed as a secondary hard disk, Install Ubuntu on the old, blank disk. (The Windows Drive Must be Present During Install of Ubuntu if you Want GRUB configured Automatically)
13. The Microsoft bootloader DOES NOT know what to do with Windows on a Secondary Disk unless boot.ini is updated. However, there is an even better GRUB Workaround!
14. One more important command is the "map" command, which you can use when you have two hard disks and an operating system such as Windows which doesn't like to be booted from the second hard disk. For example, you can map hd0 as hd1 and hd1 as hd0. In other words, you can virtually swap the two hard disks and load the desired operating system. The commands are as follows:

grub> map (hd0) (hd1)
grub> map (hd1) (hd0)

#14 was taken from (http://linuxgazette.net/issue64/kohli.html)
*#14* Ubuntu should automatically remap the drives in the chainloader statements for booting Windows. Check your /boot/grub/menu.lst file.

With the awesome hide and lock options, you can completely hide a partition from Windows with GRUB. You can also set the timeout to something low such as 0. Nobody would even know that you have another install of an entire OS on the computer. You would have to tap escape quickly to get the menu, select the hidden partition, and provide a password to boot it Smile This is the very best way to share a family computer; I think.


* At any time I can use gparted to find the drive names
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 06 Jan 2009 01:43:30 am    Post subject:

* 12-month bump *

Okay, I kind of put this off for while. I cloned the disk and resized the partition for the newer drive. But I'm stuck trying to set up boot.ini to boot as the second disk instead of the first one. Here's the boot config:


Code:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect


My theory is I'm supposed to change it to:

Quote:
[boot loader]
timeout=30
default=multi(1)disk(1)rdisk(1)partition(1)\WINDOWS
[operating systems]
multi(1)disk(1)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect


...Because multi() is the SCSI controller and disk(1) is the second disk. But I figured I'd double-check since this seems like the last error-prone part. Will these changes allow WinXP to boot through my second (larger) disk?

Everything else is working so far. This bad boy will up and running in no time! :D

[edit]
I think I found the problem. It's not just boot.ini, but appearnatly when I booted with my cloned disk for the first time I also had the parent disk connected as well (a no-no). That linked the clone to parent, making it depend on that disk just to boot up. Had the parent not been present when the clone booted, the clone would now be able to work on it's own. Should I erase the clone and then re-clone it again from scratch or is there a way to reverse the dependency problem?


Last edited by Guest on 06 Jan 2009 09:59:59 am; edited 1 time in total
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 07 Jan 2009 01:04:58 am    Post subject:

Hmmmm...it's still freezing just before the WinXP login screens. And I started over from the beginning this time. I think I have to go into boot.ini before attempting to start XP and adjust the NT boot sector [as seen here). Hopefully that'll do it.

1/7 -- Tried fixboot and automated repair last night from the Win recovery CD. Totally useless.


Last edited by Guest on 07 Jan 2009 07:27:55 pm; edited 1 time in total
Back to top
DigiTan
Unregistered HyperCam 2


Super Elite (Last Title)


Joined: 10 Nov 2003
Posts: 4468

Posted: 06 Feb 2009 07:47:39 pm    Post subject:

Well, it looks like I finally got Ubuntu stabilized. Apparently some motherboards don't get along with the kernel's acpi management and this was affecting users with nVidia drivers the worst. I still haven't cloned a successful WinXP or actually installed Ubuntu yet, but it's good to have it not randomly crash. I've still gotta say, it's a very newbie-hostile OS so far. Ubuntuforums.org couldn't answer my problem, and had I not done as fact-finding as I did, I certainly would've given up on this distro. I'm ordering a third HDD for redundancy. So I can try cloning without so much fear of breaking something.

Also looking into upgrading to Hardy next Wednesday, and checking out Debian and openSUSE.
Back to top
lordofthegeeks


Advanced Member


Joined: 13 Jul 2007
Posts: 280

Posted: 08 Feb 2009 08:55:06 pm    Post subject:

it installed on my pc pretty easy...
i have a nvidia 610I motherboard too...
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page Previous  1, 2, 3
» View previous topic :: View next topic  
Page 3 of 3 » All times are UTC - 5 Hours

 

Advertisement