How to migrate XP, Vista, Linux, BSD and Solaris to a bigger hard disk - Page 4


Page 4 of 12 FirstFirst 12345678 ... LastLast
Results 46 to 60 of 180

Thread: How to migrate XP, Vista, Linux, BSD and Solaris to a bigger hard disk

  1. #46
    Join Date
    Mar 2006
    Location
    Los Angleles, CA USA
    Posts
    9
    Quote Originally Posted by saikee

    Your extended partition behaves slightly different to my prediction. This is possibly due to the way you created it as the extended partition can have one partition type. By hiding it the partition type just has "1" added to the type number and this should show up in the "fdisk -l" command in root console.

    Can you list the "fdisk -l" output (in root console) before and after hiding sda1?
    I tried to follow your instructions in your post to me that showed how to make grub hide / unhide as best I could. The results are posted below.

    grub could not/would not allow a parameter as sda1, per your post, quoted above. I have pasted what I could get grub to do.

    grub> hide (sda1)
    Error 23: Error while parsing number

    grub> hide (sda1,1)
    Error 23: Error while parsing number

    Then I looked at the geometry as a double check to find sda or sda1

    grub> geometry (hd0)
    drive 0x80: C/H/S = 38913/255/63, The number of sectors = 625142448, /dev/sda
    Partition num: 0, Filesystem type is ext2fs, partition type 0x83
    Partition num: 1, Filesystem type unknown, partition type 0x82
    Partition num: 2, Filesystem type is ext2fs, partition type 0x83

    grub> geometry (hd1)
    drive 0x81: C/H/S = 2434/255/63, The number of sectors = 39102336, /dev/sdb
    Partition num: 0, Filesystem type is ext2fs, partition type 0x83
    Partition num: 2, Filesystem type is ext2fs, partition type 0x83
    Partition num: 4, Filesystem type unknown, partition type 0x82
    Partition num: 5, Filesystem type unknown, partition type 0x82
    ========================================

    WITH (hd0,1) HIDDEN, the output is:

    NEXT, the above mistake made me think you meant (hd0) so I:

    grub> hide (hd0,1)

    and the output of fdisk -l is:

    mark@Lexington:~$ sudo fdisk -l

    Disk /dev/sda: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000080

    Device Boot Start End Blocks Id System
    /dev/sda1 1 1785 14337981 83 Linux
    /dev/sda2 1786 2040 2048287+ 92 Unknown
    /dev/sda3 * 2041 2306 2136645 83 Linux

    Disk /dev/sdb: 20.0 GB, 20020396032 bytes
    255 heads, 63 sectors/track, 2434 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000080

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 2040 16386268+ 83 Linux
    /dev/sdb2 2307 2434 1028160 5 Extended
    /dev/sdb3 * 2041 2306 2136645 83 Linux
    /dev/sdb5 2328 2434 859446 82 Linux swap / Solaris
    /dev/sdb6 2307 2327 168619+ 82 Linux swap / Solaris

    =====================

    and then I

    grub> unhide (hd0,1)

    with state as NOT hidden the output of fdisk -l, below:

    mark@Lexington:~$ sudo fdisk -l

    Disk /dev/sda: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000080

    Device Boot Start End Blocks Id System
    /dev/sda1 1 1785 14337981 83 Linux
    /dev/sda2 1786 2040 2048287+ 82 Linux swap / Solaris
    /dev/sda3 * 2041 2306 2136645 83 Linux

    Disk /dev/sdb: 20.0 GB, 20020396032 bytes
    255 heads, 63 sectors/track, 2434 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000080

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 2040 16386268+ 83 Linux
    /dev/sdb2 2307 2434 1028160 5 Extended
    /dev/sdb3 * 2041 2306 2136645 83 Linux
    /dev/sdb5 2328 2434 859446 82 Linux swap / Solaris
    /dev/sdb6 2307 2327 168619+ 82 Linux swap / Solaris

    Is there a way to make grub hide or unhide a device called: sda? or sda1? Is that what you want?

  2. #47
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    It appears that your two previous swap logical partitions have gone into one. This may not be a fault as a swap is just a scratch area for temporary storage.

    Youe have hide the sda2 successfully already.

    Your sda2 is now a primary partition of type 82 which is recognised by the kernel. By hiding it the type number changed to 92 (the "1" is added to the second digit as expected) and not recognised by the Linux kernel.

    The matter is therefore simplified now. You don't have to hide sda2 any more. Just use Gparted to shift the partitions around to chnage their size to your wish.

    You PC should boot OK if you amend the Linux's fatab in sda to mount only sda2 (instead of sda5 and sda6 or sda5 and sda6).

    I would now edit fstab to get the Linux in sda working first before changing its partitions sizes. If you have a problem then post the /etc/fstab and /boot/grub/menu.lst (/boot/grub/device.map also useful) of the Linux in sda here.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  3. #48
    Join Date
    Mar 2006
    Location
    Los Angleles, CA USA
    Posts
    9
    Quote Originally Posted by saikee
    It appears that your two previous swap logical partitions have gone into one. This may not be a fault as a swap is just a scratch area for temporary storage.

    I think I deleted all partitions except the one labeled with the word: boot and the one above it which as labeled: sda1

    Youe have hide the sda2 successfully already.

    I'm not so sure it is hidden. It is more likely deleted.

    Your sda2 is now a primary partition of type 82 which is recognised by the kernel. By hiding it the type number changed to 92 (the "1" is added to the second digit as expected) and not recognised by the Linux kernel.

    The matter is therefore simplified now. You don't have to hide sda2 any more. Just use Gparted to shift the partitions around to chnage their size to your wish.

    You PC should boot OK if you amend the Linux's fatab in sda to mount only sda2 (instead of sda5 and sda6 or sda5 and sda6).

    Sorry, I think you mean fstab, not fatab. Anyway, as you can see from the fstab output below, there is no sda6.

    I would now edit fstab to get the Linux in sda working first before changing its partitions sizes. If you have a problem then post the /etc/fstab and /boot/grub/menu.lst (/boot/grub/device.map also useful) of the Linux in sda here.
    I'm too confused to do anything. The last time I edited my menu.lst I lost the entire drive. And had to reformat/reinstall. I'm going to wait for your advice/instructions before I continue.

    ==========================

    output of: /etc/fstab

    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc defaults 0 0
    # /dev/sda1
    UUID=7a70ca0f-767b-4efb-8d00-7b5c800098d4 / ext3 defaults,errors=remount-ro 0 1
    # /dev/sda5
    UUID=89e97a5c-4907-46f4-80eb-376f871c1d49 none swap sw 0 0
    /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
    /dev/scd1 /media/cdrom1 udf,iso9660 user,noauto 0 0
    /dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

    =====================
    output of /boot/grub/menu.lst

    # menu.lst - See: grub(8), info grub, update-grub(8)
    # grub-install(8), grub-floppy(8),
    # grub-md5-crypt, /usr/share/doc/grub
    # and /usr/share/doc/grub-doc/.

    ## default num
    # Set the default entry to the entry number NUM. Numbering starts from 0, and
    # the entry number 0 is the default if the command is not used.
    #
    # You can specify 'saved' instead of a number. In this case, the default entry
    # is the entry saved with the command 'savedefault'.
    # WARNING: If you are using dmraid do not change this entry to 'saved' or your
    # array will desync and will not let you boot your system.
    default 0

    ## timeout sec
    # Set a timeout, in SEC seconds, before automatically booting the default entry
    # (normally the first entry defined).
    timeout 3

    ## hiddenmenu
    # Hides the menu by default (press ESC to see the menu)
    hiddenmenu

    # Pretty colours
    #color cyan/blue white/blue

    ## password ['--md5'] passwd
    # If used in the first section of a menu file, disable all interactive editing
    # control (menu entry editor and command-line) and entries protected by the
    # command 'lock'
    # e.g. password topsecret
    # password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
    # password topsecret

    #
    # examples
    #
    # title Windows 95/98/NT/2000
    # root (hd0,0)
    # makeactive
    # chainloader +1
    #
    # title Linux
    # root (hd0,1)
    # kernel /vmlinuz root=/dev/hda2 ro
    #

    #
    # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

    ### BEGIN AUTOMAGIC KERNELS LIST
    ## lines between the AUTOMAGIC KERNELS LIST markers will be modified
    ## by the debian update-grub script except for the default options below

    ## DO NOT UNCOMMENT THEM, Just edit them to your needs

    ## ## Start Default Options ##
    ## default kernel options
    ## default kernel options for automagic boot options
    ## If you want special options for specific kernels use kopt_x_y_z
    ## where x.y.z is kernel version. Minor versions can be omitted.
    ## e.g. kopt=root=/dev/hda1 ro
    ## kopt_2_6_8=root=/dev/hdc1 ro
    ## kopt_2_6_8_2_686=root=/dev/hdc2 ro
    # kopt=root=UUID=7a70ca0f-767b-4efb-8d00-7b5c800098d4 ro

    ## Setup crashdump menu entries
    ## e.g. crashdump=1
    # crashdump=0

    ## default grub root device
    ## e.g. groot=(hd0,0)
    # groot=(hd0,0)

    ## should update-grub create alternative automagic boot options
    ## e.g. alternative=true
    ## alternative=false
    # alternative=true

    ## should update-grub lock alternative automagic boot options
    ## e.g. lockalternative=true
    ## lockalternative=false
    # lockalternative=false

    ## additional options to use with the default boot option, but not with the
    ## alternatives
    ## e.g. defoptions=vga=791 resume=/dev/hda5
    # defoptions=quiet splash

    ## should update-grub lock old automagic boot options
    ## e.g. lockold=false
    ## lockold=true
    # lockold=false

    ## Xen hypervisor options to use with the default Xen boot option
    # xenhopt=

    ## Xen Linux kernel options to use with the default Xen boot option
    # xenkopt=console=tty0

    ## altoption boot targets option
    ## multiple altoptions lines are allowed
    ## e.g. altoptions=(extra menu suffix) extra boot options
    ## altoptions=(recovery) single
    # altoptions=(recovery mode) single

    ## controls how many kernels should be put into the menu.lst
    ## only counts the first occurence of a kernel, not the
    ## alternative kernel options
    ## e.g. howmany=all
    ## howmany=7
    # howmany=all

    ## should update-grub create memtest86 boot option
    ## e.g. memtest86=true
    ## memtest86=false
    # memtest86=true

    ## should update-grub adjust the value of the default booted system
    ## can be true or false
    # updatedefaultentry=false

    ## should update-grub add savedefault to the default options
    ## can be true or false
    # savedefault=false

    ## ## End Default Options ##

    title Ubuntu 7.10, kernel 2.6.22-14-generic
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=7a70ca0f-767b-4efb-8d00-7b5c800098d4 ro quiet splash
    initrd /boot/initrd.img-2.6.22-14-generic
    quiet

    title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=7a70ca0f-767b-4efb-8d00-7b5c800098d4 ro single
    initrd /boot/initrd.img-2.6.22-14-generic

    title Ubuntu 7.10, kernel 2.6.20-16-generic
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=7a70ca0f-767b-4efb-8d00-7b5c800098d4 ro quiet splash
    initrd /boot/initrd.img-2.6.20-16-generic
    quiet

    title Ubuntu 7.10, kernel 2.6.20-16-generic (recovery mode)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=7a70ca0f-767b-4efb-8d00-7b5c800098d4 ro single
    initrd /boot/initrd.img-2.6.20-16-generic

    title Ubuntu 7.10, memtest86+
    root (hd0,0)
    kernel /boot/memtest86+.bin
    quiet

    ### END DEBIAN AUTOMAGIC KERNELS LIST

    ==============================

    output of boot/grub/device.map

    (hd0) /dev/sda
    (hd1) /dev/sdb

  4. #49
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    OK I shall take you by the hand.

    When you hide (hd0,1) your "fdisk -l" has this output
    Code:
    Disk /dev/sda: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000080
    
    Device Boot Start End Blocks Id System
    /dev/sda1 1 1785 14337981 83 Linux
    /dev/sda2 1786 2040 2048287+ 92 Unknown
    /dev/sda3 * 2041 2306 2136645 83 Linux
    When you unhide sda2 (or (hd0,1) to Grub) the output is
    Code:
    Disk /dev/sda: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000080
    
    Device Boot Start End Blocks Id System
    /dev/sda1 1 1785 14337981 83 Linux
    /dev/sda2 1786 2040 2048287+ 82 Linux swap / Solaris
    /dev/sda3 * 2041 2306 2136645 83 Linux
    This is exactly what it should be. In normal mode sda2 is a swap with Type 82. Hiding it adds "1" to its first digit making it Type 92. Type 92 is unknown to the kernel so it reports it as unknown.

    The hiding and unhiding with sda2 is no longer necessary because it is not an extended partition containing more than one logical partition inside.

    How do we know it is a primary? By the device name sda2. Because all logical starts at the 5th position while sda1 to sda4 are reserved primaries.

    How do we know sda2 is no longer an extended partition? By the partition type 82. An extended partition will have a different partition type.

    So your sda disk is now perfect and all you need is to fire it up. So let's look at the 3 files that affects its booting.

    (1) /boot/grub/menu.lst

    This looks alright to me as it boots only the (hd0,0) or sda1. What you can improve the situation is to amend it with the red bits I added here
    Code:
    timeout 300
    
    ## hiddenmenu
    # Hides the menu by default (press ESC to see the menu)
    #hiddenmenu
    I elongate the timeout statement to 300 seconds to allow you plenty time to decide on which system to boot. The "#" I added in front of the hiddenmenu statement will cause the full menu to be displayed. The "#" is use to disable the line, as Grub does not execute any line started with a "#".

    The changes are optional but can help you to boot the system manually should you require to do it.

    Your booting choices are all for one Linux using different kernels and different modes. Normally the default is the first one you should boot.

    (2) /boot/grub/device.map

    This is correct too as the (hd0) to Grub is device sda in Linux. No action is needed here.

    (3) /etc/fstab

    This needs updating because you have no sda5 and so the line for swap has to be changed as follow (marked in red)
    Code:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc defaults 0 0
    # /dev/sda1
    UUID=7a70ca0f-767b-4efb-8d00-7b5c800098d4 / ext3 defaults,errors=remount-ro 0 1
    # /dev/sda5
    /dev/sda2  none swap sw 0 0
    /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
    /dev/scd1 /media/cdrom1 udf,iso9660 user,noauto 0 0
    /dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
    After carry out the changes and save the files I suggest you restore the Grub as follow

    (a) Boot it up with a Live CD or continue if you are using the Live CD

    (b) Invoke a Grub prompt and restore Grub
    Code:
    sudo grub
    root (hd0,0)
    setup (hd0)
    quit
    If no error is reported reboot the PC, remove the CD and the Linux in sda will appear.

    If you have any trouble in booting the partition is always safe and there is no need to format or destry it. You can always rescue any Linux by just a Live CD! Don't forget it.

    I have not mentioned the Linux in sdb because your information suggests that it should not affect the execution of sda disk.

    Lastly do not get confused. If you do not understand the commands just ask why!
    Last edited by saikee; 12-04-2007 at 01:43 PM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  5. #50
    Join Date
    Mar 2006
    Location
    Los Angleles, CA USA
    Posts
    9
    FIRST: Thank you for a "hand".

    The instructions worked as you said they would.

    mark@Lexington:~$ sudo fdisk -l

    Disk /dev/sda: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00000080

    Device Boot Start End Blocks Id System
    /dev/sda1 1 1785 14337981 83 Linux
    /dev/sda2 1786 2040 2048287+ 82 Linux swap / Solaris
    /dev/sda3 * 2041 2306 2136645 83 Linux


    Now - What is next? Do I allocate the unused 280 gig to sda3? or sda1? I know the partitioning must be done contiguously, but I haven't the foggiest as to how to go about that. This is how I lost/removed sda-s 5 & 6 a few days ago. It the 280 gig goes to sda1, where does sda2 and 3 go in the meantime?

    Thank you again.
    Attached Images Attached Images

  6. #51
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    The size of a Linux partition depends on how you use it.

    If you download a lot of Internet data then your /home directory will be huge. However if you move the data regularly to a neutral partition that can be mounted in different OSes then your Linux partition can be a lot smaller.

    I would say a 10Gb partition is big enough to hold 99% of the Linux which is about 2.5 to 3.5Gb large when first installed. Some Linux users, me included, like to keep useful data in a personal partition that will be safe from the failure of a operating system. This makes backing up data smaller and easier because I don't need to back up the operating system.

    In your case I would recommend varying the sda1 to test Gparted ability to resize the partition. Any thing larger than 20Gb for a Linux is hard to maintain as you will not know which data is yours and which are system-related.

    There is no standard usage of a hard disk. You should just try different combinations and find one that has the best appeal to you, while in the process learn the various tasks you can do in Linux.

    You need to resize sda1 so that you can be sure yourself that you are indeed using the Linux from the disk sda and not from disk sdb.
    Last edited by saikee; 12-04-2007 at 06:07 PM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  7. #52
    Join Date
    Mar 2006
    Location
    Los Angleles, CA USA
    Posts
    9
    I got very lost somehow. I removed the # from the fstab file, but then on shutdown, the OS reported failures which flashed by too fast for me to read, but they did involve sda5.

    Next, I'm no closer to understanding why I can't or shouldn't use the remaining 280gig for /home? I have no other OSs that should "share" and believe me, the trouble with ONE os is enough. I'm a food writer, and get hurt easily just touching a keyboard (just kidding).

    Lastly, please look at the attached screenshots. How on Earth is it Possible that a disk can be "unmounted" and operating at the same time?
    Attached Images Attached Images

  8. #53
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    This time you only got yourself to blame by removing the # indiscriminately in fstab, as nobody advised you to do it. I have been careful in even highlighting the changes in red for you. If you self-inflict damages to your system then it will be very difficult for others to rescue your system.

    What you should do is to revert to the working system you have before.

    Your system should have sda1, sda2 and sda3. If you want to enlarge sda1 you need to "bodily" shift sda2 and sda3 to the end of the disk so that sda1 boundary can be resized.

    On the unmounting problem I believe it is just your understanding of an extended partition which is just a border for holding a set of logical partitions. Since you have no logical partition inside so there is nothing mountable. Thus Gparted is displaying everything correctly.

    You can gain a better understanding if you use the terminal program "cfdisk" to do partition. With cfdisk there is "no" facility to create an extended partition. You only create either a primary or a logical partition. When the first logical partition is created the extended partition is automatically generated, using the next available unused primary partition position between sda1 to sda4.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  9. #54
    Join Date
    Mar 2006
    Location
    Los Angleles, CA USA
    Posts
    9
    "This time you only got yourself to blame by removing the # indiscriminately in fstab, as nobody advised you to do it . . .

    What you should do is to revert to the working system you have before."

    Here is the problem, the entire 320gig drive is working without problem, it simply isn't mounted. Every partition: primary, logical, extended.

    Your system should have sda1, sda2 and sda3. If you want to enlarge sda1 you need to "bodily" shift sda2 and sda3 to the end of the disk so that sda1 boundary can be resized.

    My disk, as currently partitioned has the three partitions you describe. From the screenshot you can see there is an additional huge sda4.

    On the unmounting problem I believe it is just your understanding of an extended partition which is just a border for holding a set of logical partitions. Since you have no logical partition inside so there is nothing mountable. Thus Gparted is displaying everything correctly.

    I don't fully understand what you mean, the screenshot, named: /dev/sda3.png, shows that the boot directory isn't mounted. I do say that the disk drive seems to be working flawlessly. Ubuntu Gutsy Gibbon (v 7.10) was reporting shutdown errors (fail) when the # was removed

    You can gain a better understanding if you use the terminal program "cfdisk" to do partition. With cfdisk there is "no" facility to create an extended partition. You only create either a primary or a logical partition. When the first logical partition is created the extended partition is automatically generated, using the next available unused primary partition position between sda1 to sda4.

    If I had time to become as skilled as you, sir, I would give up my day job and become a Linux programmer. As it stands, I had hoped to take the information from these posts and write a brief tutorial on how to make this painless, but I no longer believe that is possible. The painless part, I mean. I will endeavor to change the partitions as you suggest, moving them "up" one at a time. While we all know that nothing is foolproof, it is hard to reconcile the dearth of information about Linux partitioning. If I had Linux and M$, then the job would have been painless. Nuts. Thanks for your time.

  10. #55
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    According to the fstab your Ubuntu uses only sda1 as the root filing system.

    It uses sda2 as the swap.

    Your sda3 has never been used by Ubuntu. It could be another partition you might have created before, possible for another Linux which you can boot too if you are prepared to amend its fstab to take account of the alteration of the swap partition.

    You are now using Ubuntu on sda1 partition that is about 14Gb.

    You have correctly cloned the distro across and condensed the two previous sda5 and sda6 swap logical partition into one swap primary partition sda2.

    On the mounting of the partition you can always mount it manually in terminal or automatically by amended the fstab. Some distros mount every partition automatically, others only mount the ones detected during installation and some leave the users to decide what they want.

    I notice you have created sda4 as the extended partition but as it was not part of the Ubuntu Linux it can only be mounted as an additional feature like a data-only partition. In any case as I have said before your extended partition cannot store anything. It is just a frame or a border! The storage come from the logical partitions. You are now at liberty to create sda5 to sda15, a total of 11 logical partitions in future as long as there is still empty hard disk space within the 280Gb of sda4.

    Your previous post tells us your main intention is to enlarge sda1. Thus creating sda4 is an diversion which we do not understand your motive because that eats up every available empty hard disk space making your original task impossible to accomplish.

    I am not a programmer myself and my work is totally unrelated to IT. I do not have any advantage over you except may be starting a bit earlier than you.

    I believe you have succeeded in migrating the operating systems but failed in resizing the partitions. The failure is due to the unexpected creation of sda4.

    If you want to resize sda1 as originally intended then you need to delete sda4.

    I am sorry to see that you are frustrated by the terminal program cfdisk which is what a user should have used for creating partitions due to its simplicity. Gparted creates and formats a partition simultaneously and so it is much more difficult to understand, control and reverse.

    On partitioning of a hard disk I would say one can understand the process a lot better in Linux than any MS system, especially with the terminal commands. The process is identical to MS Windows, Solaris and BSD systems so you do not waste time and energy to learn it. Believe me it is not a pain to understand something you have overlooked in the past. If you multi-boot and are therefore heavily dependent on the partition integrity you would not go very far without the basic knowledge of how the partitions work. Yet partitioning of an entire hard disk is just writing out a maximum of 64 bytes in the MBR and nothing else. You will laugh at yourself one day on this "pain" when you have mastered the concept of the partition table.

    You may have a high opinion of M$ partitioning software but it can only do a fraction of what Linux can do. For a start Linux supports 100+ partition types. You can use Linux to prepare partitions for every operating systems in the PC. Try it with a M$ system and you will know its limitations.
    Last edited by saikee; 12-06-2007 at 08:24 PM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  11. #56
    Join Date
    Oct 2002
    Location
    Mauritius, Indian Ocean (GMT+0400)
    Posts
    17

    just wonderining...

    saikee,

    First of all, thank you for your dedication and the help you are to all those newbies ( like myself ). I haven't yet used any of your how-to's yet but, I'm sure one day I will.

    I have noticed that some of your how-to's are very explicit and hence lengthy. I was wondering why you have not made them into pdf documents!!!

    It's just a suggestion but i suppose you have your own reasons why you've not done so.

    Thanks again.

  12. #57
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    knarf_foo,

    The existing format in the howto of the Justlinux allows me to add, amend and update information. Thus if a howto is useful and popular I would try to maintain it, making it up to date.

    I have thought of making some of the information into help files for submission to the Justlinux but changes in Linux have been so rapid that I find continuous updates can make the information more useful.

    I tend to put in the technical information, sometimes with explanation, so that readers can alert me if there is something inaccurate.

    Can't get everything right myself but I am trying to be factual. The joy of Linux is once you know its inner working you can play tunes with it. To me it is equally important to understand it as well as using it.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  13. #58
    Join Date
    Feb 2008
    Location
    Zion
    Posts
    23
    Quote Originally Posted by saikee
    MkIII_Supra,

    I never need to do cloning with Linux partitions myself.

    The mod here has taught me using tar. Here is what I would go about getting a 120Gb /home into a 500Gb disk

    (1) Boot up the existing Linux

    (2) I am assuming the 500Gb disk starts as a raw disk and has a name , say sde. I would use cfdisk (or fdisk if you are using a Red Hat) to create a partition sde1 for the whole disk or a size of my choice. It should automatically Type 83 native for Linux. A reboot is unnecessary but doing one is a good practice if you can afford the time.

    (3) I would then format the sde1 to the filing system of my choice and then manually mount it by terminal command in root
    Code:
    mkdir /mnt/sde1
    mount /dev/sde1 /mnt/sde1
    (4) The tar instruction I learned from the mod is
    Code:
    cd /home
    tar cf - . | ( cd /mnt/sde1; tar xf -)
    The tar command will copy the entire content of the current partition (that I have changed directory to), inculding all settings of ownership to /mnt/sde1.

    (5) I would now check the content of /mnt/sde1 and satisfy myself everything is there. Then I would edit /etc/fstab to mount the /home to sde1

    On a reboot I should have my home in the 500Gb disk environment. After a short period of usage and convinced the /home is working perfectly I shall use the 120Gb disk for another purpose.

    The cloning procedure of Post #1 can be used too but you have to resize the partition after the cloning operation. It has the following disadvantges

    (a) You clone every bit of the the entire 120Gb including unused and empty spaces. Tar only moves files and empty spaces are left behind so it is much faster.

    (b) You have to resize the partition from 120Gb to 500Gb. Tar transfer the files from 120Gb to 500Gb naturally.

    The cloning is only necessary if the OS has a protection mechanism or a rigid arrangement for retrieving its system files. Linux partitions do not fall into that category and so the normal Linux commands are good enough to move Linux systems from partition to partition and from hard disk to hard disk.

    I include Linux in my title mainly because I clone disks with many operating systems inside.

    Personally I rarely resize a partition for Linux. I enjoy the teaching by the mod and it gives a kick every time I use it. To me that is what Linux is all about ---> a rich set of Command Line Interface (CLI) that is superior to other OSs.

    I use tar, exactly the same instructions as above except cd to /mnt/sdax instead to /home, to move the entire Linux which I always installed in a single partition. When needed I mount an additional data partition.
    the person you were replying to was leaving boot on the existing hdd, would this work to migrate everything? I posted here about wanting to use my faster hdd, If possible I'd like to avoid reconfiguring everything and possible. I'd be moving my os which is about 10gb right now on a 80gb sata to a 750gb and using the 80 for a back up of some sort.

  14. #59
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    rjhythloday,

    Welcome to Justlinux.


    The easiest is to follow Post #1 of this thread.

    My reply to MKIII_Supra also work but is slightly more involved. The basic difference is

    dd copies binary bits of "1" and "0" of the hard disk. You therefore clone the 80Gb hdd partition table onto the new 750Gb disk. It will boot exactly as the 80Gb because the boot sector is also duplicated. You get an exact clone. The remainder of the 750Gb become unallocated hard disk space. You can create additional partition with the unallocated space or run "gparted" or "Parted Magic" live CD to resize the existing partitions to absorb the unallocated space. The choice is youre.

    If you use file copying command, like tar as I recommended to MKIII_Supra, only the files are copied and not the partition table or the boot sector. Therefore you need to restore the boot loader which is a simple matter. This solution does allow you to choose a destination partition of any size without the need of resizing.

    All the information is contained in Post #1 which is the "Howto". The other posts, like the present one are queries and answers.

    Please feel free to raise questions. You will find a lot of willing helpers here.

    I normally offer too much information as I try to explain the steps. The actual cloning operation is dead simple.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  15. #60
    Join Date
    Feb 2008
    Location
    Zion
    Posts
    23
    Thanks for the reply, I'll give the clone a shot. I did manage to restore my xorg.conf today from cl. I put my agp back in and was hoping it would just auto detect. More reading to do!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •