Ubuntu migration: From Virtual Disks to real partitions

Source: Internet
Author: User
Article Title: ubuntu migration: from virtual disk to real partition. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

To enhance the experience of windows users, ubuntu has made some important improvements by inviting windows users to join the linux camp: allows you to directly install ubuntuon on windows and run the windows executable program wubi.exe on the installation disc; windows users are allowed to install ubuntu in a file (similar to vmware virtual hard disk) in the windows partition without any available disk space ).

I installed Ubuntu directly in windows. After using it for a while, I thought ubuntu8.04 was good and wanted to move it out of the Virtual File, store it directly to my new partition to improve the disk access performance of ubuntu. After all, Virtual Disks are not really fast. After a day of research, the migration was successful and shared with you. The purpose of writing this article is not to encourage everyone to perform similar migration behaviors like me, but to study with everyone and better understand some of the features and technologies of the linux operating system.

The procedure is as follows:

 1. Create a New Partition

(Because I have no partitions for the last 50 GB of the disk during windows installation, I will leave it for later use, so there is space to create new partitions)

To create a partition, run the following command in the ubuntu operating system:
Sudo fdisk/dev/sda

For detailed operations, see the following:
Administrator @ administrator-desktop :~ $ Sudo fdisk/dev/sda

The number of cylinders for this disk is set to 19457.
There is nothing wrong with that, but this is larger than 1024,
And coshould in certain setups cause problems:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(E.g., dos fdisk, OS/2 FDISK)

Command (m for help): p

Disk/dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Disk identifier: 0x1e851e84

Device Boot Start End Blocks Id System
/Dev/sda1*1 1275 10241406 7 HPFS/NTFS
/Dev/sda2 1276 18355 137195100 f W95 Ext 'd (LBA)
/Dev/sda5 1276 2550 10241406 7 HPFS/NTFS
/Dev/sda6 2551 6374 30716248 + 7 HPFS/NTFS
/Dev/sda7 6375 8924 20482843 + B W95 FAT32

Command (m for help): n
Command action
L logical (5 or over)
P primary partition (1-4)
L
First cylinder (10750-18355, default 10750 ):
Using default value 10750
Last cylinder or + size or + sizeM or + sizeK (10750-18355, default 18355): + 14G

Command (m for help): w
The partition table has been altered!

Calling ioctl () to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
Administrator @ administrator-desktop :~ $

Note:
After entering fdisk, the prompt Command (m for help) appears: Enter the Command. The Common commands are as follows:
P show existing partitions
N create a new partition
M display help
W write changes to the disk

Ii. Format and create a partition
After creating a partition, run the fdisk p command to display the partition information again, as shown below:
/Dev/sda1*1 1275 10241406 7 HPFS/NTFS
/Dev/sda2 1276 18355 137195100 f W95 Ext 'd (LBA)
/Dev/sda5 1276 2550 10241406 7 HPFS/NTFS
/Dev/sda6 2551 6374 30716248 + 7 HPFS/NTFS
/Dev/sda7 6375 8924 20482843 + B W95 FAT32
/Dev/sda8 8925 10749 14659281 83 Linux

The device number of the new partition is/dev/sda8. format it! Command: sudo mkfs-j/dev/sda8

Restart once after formatting is completed.

[1] [2] [3] Next page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.