In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "where is the Ubuntu partition". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "where is the Ubuntu partition"?
Since I used Ubuntu, I found that I have less and less dependence on Windows. I deleted my Vista two days ago. Now there is only Ubuntu in the system, so I want to transfer Ubuntu from partition 3 to partition 1.
0: my configuration: partition:
◆ sda1 former Vista.
There are two logical partitions (sda5,sda6) under the ◆ sda2 extended partition.
◆ sda3 Ubuntu partition.
◆ sda4 Swap partition.
1: start from LiveUSB (LiveCD).
Use the existing system's production LiveUSB tool and installation image to make LiveUSB. Of course, you can also use LiveCD. It is recommended to use LiveUSB (LiveCD may not be able to create a directory when the partition is mounted). Select your boot device in the boot options (use Del key or F2 key or F12 key to enter the boot option, depending on the machine)
2: Mount sda1 and sda3.
There is nothing to say about this. You can mount it in a file browser or use the mount command manually.
3: move the file.
Use the cp-ax / media/ partition 3Accord * / media/ partition 1 / "partition 1" is the directory mounted by sda1, and "partition 3" is the directory mounted by sda3. Adding the-ax parameter ensures that the attributes are retained during replication.
4: reinstall grub.
The goal of this step is to ensure that grub looks for the menu.lst file from sda1, not the original sda3. Method: still on the LiveUSB, open the terminal, enter the sudo grub command, it may take a while, and then the grub > prompt appears; enter find / boot/grub/stage1, if there are two items (hd0,0) (hd0,2), it means you have no problem with the copy; then enter: root (hd0,0), indicating that the boot partition is the 0th partition on the 0th hard disk (in grub, 0 means 1 for 2, and so on) Then type: setup (hd0) to install grub on the 0th hard drive.
5: modify menu.lst.
The most critical step of ◆ is whether it can be booted from the new system. Open the terminal
◆ renames the original menu.lst: enter the / boot/grub directory under the partition 3 directory in the terminal, and use the sudo mv menu.lst newfilename to rename menu.lst (newfilename is any other name) cd command to enter the / boot/grub directory under the sda1 mount directory
◆ looks at the partition UUID:sudo ls-l / dev/disk/by-uuid and records the UUID of sda1 and sda3 (partition number sdx at the end of the line)
◆ modifies the menu.lst:sudo cp menu.lst menu.lst.backupfile (backup menu.lst file) sudo gedit menu.lst on partition 1, replacing the UUID of the sda3 with the UUID of sda1, then saving and closing the gedit and the terminal
Note: some people's grub may not use UUID to identify the partition, you can directly change the / dev/sda3 in the menu.lst to / dev/sda1.
6: restart. Boot from the hard drive (change back to your settings and no longer boot with LiveUSB)
If successful, enter any directory to check the remaining space. If it matches the remaining space of the new partition, this step will enter the new partition. If you have no problem after using it for a period of time, you can delete the original sda3 for other use. If it fails, restore the menu.lst on partition 3 and use root (hd0,2) and then setup (hd0) under the grub command to reinstall grub.
Thank you for your reading, the above is the content of "where is the Ubuntu partition?" after the study of this article, I believe you have a deeper understanding of the problem of Ubuntu partition, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.