I only did one thing during the two days at home last weekend, and that was to install the system. Different from taking a ghost disk to install the system (win) a long time ago, this time toss is more technical. In the whole process, I broke the card holder of an sdcard, and I checked the sdcard countless times. In the end, it was discovered that the full hard disk installation was enough.
What did you learn from this process? To put it simply, boot the system through grub, install the system through the hard disk, and there is a chip in the original card tray (or card reader) (before I thought it was just a connection).
My laptop is a complete ubuntu system, and all the places where win was used before run in the virtual machine, which is slow. So there was the idea to install a win system under ubuntu. At the same time, I want to try archlinux, so the final ideal result is to install a dual system of archlinux and ubuntu.
The original idea is very simple, first reinstall the system as a win system, and then install an archlinux. There are more information in this area on the Internet, and it is easier to install. Reluctant to start after writing winxp into the sdcard, I found that the hard disk could not be found. It is estimated that I changed the entire hard disk format to ext4, and found that this path did not work, so I found another solution.
Since you can't install win first, change the plan and find articles about installing win under linux on the Internet. There have been some detours, mainly because the disk partition needed to install win was not considered at the beginning, and the system that can only boot the installation version through grub installation, ghost cannot be installed. Therefore, first use it as a gparted live disk, then enter the system, and draw an ntfs partition from the disk. Then boot the installation image of win7 through grub to install. After tossing, I basically understand how to boot the system with grub.
As mentioned above, if you also have a complete Linux environment, you must first create an ntfs partition. Then come to configure grub.
Which partition you need to install the system on can be checked by sudo fdisk -l. For example, mine is:
Device Boot Start End Blocks Id System
/dev/sda1 204837117542318558668883 Linux
/dev/sda2 *575975424616935423204800007 HPFS/NTFS/exFAT
Among them, /dev/sda2 is the ntsf partition that I divided, then I will install the win system here.
Establishing an iso image under ubuntu is much easier than under win. No other software is needed at all, just one command:
mkdir /mnt/win7
sudo mount -o loop windows7.iso /mnt/win7
sudo cp -rv /mnt/win7/* /dev/sda2
In this way, write win7 to your newly created partition (actually, decompress the image to the partition you created), and then boot.
In fact, it is a matter of several configurations. If your ubunut system does not select the system menu when it is turned on, you need to press shift to display it after booting. In fact, you can enter grubdos by pressing c in the system selection menu section without going through the configuration file. But there are more things to remember like that.
The configuration file here refers to the /boot/grub/grub.cfg configuration file in the system. In this file, you will see code similar to the following. When adding, write it in the same structure.
Thanks to netizens for pointing out, and there is another sentence to say, the value of blog is not only in articles, comments also have their value. This is like an open source project. There are bugs in it. If you find it, of course the discovery is also valuable, but it is more valuable to mention a patch, which is the same for others and yourself.
The configuration file is as follows:
menuentry "Windows 7 (loader) (on /dev/sda2)"--classwindows--classos{
insmod ntfs
set root='(hd0,2)'ntldr(hd0,2)/bootmgr
boot
}
Note here that your win7 is the installation disk, not the ghost disk.
At this time, restart, you found an additional win7 option on the menu of selecting the operating system, and then the installation is normal. What needs to be reminded here is that I allocated 20 G of space to the win partition and installed it. After win7 and some basic software, only less than 1G is left, so if the disk is rich, you need to allocate more space.
Installing archlinux is more troublesome, because you can't directly boot the system from the partition you want to install. Therefore, you need to put the boot file system in another partition first, such as the home/the5fire/arch directory in my main partition (/dev/sda1/), and then write the grub configuration:
menuentry "Arch Install"--classgnu-linux --classgnu--classos{
insmod part_msdos
insmod ext2
set root='(hd0,1)'linux(hd0,1)/arch/boot/vmlinuz-linux root=/dev/sda1
initrd /boot/initramfs-linux.img
}
Start from here and enter the installation mode, which is actually a terminal.
You can refer to these two articles for the rest:
http://eidolon.iteye.com/blog/320923 Start from step 5.
Archlinux Chinese Newbie Guide
That's about it. If you have enough time, it's not bad to toss it yourself.
After installing archlinux, I actually didn't use it, because I had to install the GUI, and I needed to configure many things. The time cost didn't allow it. It was better to use a lightweight desktop under ubuntu. I have been trying out E17 desktop in the past two days.
Recommended Posts