Linux
Linux
参考:EFI system partition
how do i install ubuntu alongside a pre installed windows with uefi
内存空间查看
- df: df -lh
- fdisk: fdisk -l
- cfdisk
Linux分区挂载点介绍(old, just for comprehension)
Linux分区挂载点介绍,推荐容量仅供参考不是绝对,跟各系统用途以及硬盘空间配额等因素实际调整:
| 分区类型 | 介绍 | 备注 |
|---|---|---|
| /boot | 启动分区 | 一般设置100M-200M,boot目录包含了操作系统的内核和在启动系统过程中所要用到的文件。 |
| / | 根分区 | 所有未指定挂载点的目录都会放到这个挂载点下。 |
| /home | 用户目录 | 一般每个用户100M左右,特殊用途,比如放大文件也可再加上G。分区大小取决于用户多少。对于多用户使用的电脑,建议把/home独立出来,而且还可以很好地控制普通用户权限等,比如对用户或者用户组实行磁盘配额限制、用户权限访问等。 |
| /tmp | 临时文件 | 一般设置1-5G,方便加载ISO镜像文件使用,对于多用户系统或者网络服务器来也有独立挂载的必要。临时文件目录,也是最常出现问题的目录之一。 |
| /usr | 文件系统 | 一般设置要3-15G,大部分的用户安装的软件程序都在这里。就像是Windows目录和Program Files目录。很多Linux家族系统有时还会把/usr/local单独作为挂载点使用。 |
| /var | 可变数据目录 | 包含系统运行时要改变的数据。通常这些数据所在的目录的大小是要经常变化的,系统日志记录也在/var/log下。一般多用户系统或者网络服务器要建立这个分区,设立这个分区,对系统日志的维护很有帮助。一般设置2-3G大小,也可以把硬盘余下空间全部分为var。 |
| /srv | 系统服务目录 | 用来存放service服务启动所需的文件资料目录,不常改变。 |
| /opt | 附加应用程序 | 存放可选的安装文件,个人一般把自己下载的软件资料存在里面,比如Office、QQ等等。 |
| swap | 交换分区 | 一般为内存2倍,最大指定2G即可 |
| 以下为其它常用的分区挂载点 | ||
| /bin | 二进制可执行目录 | 存放二进制可执行程序,里面的程序可以直接通过命令行调用,而不需要进入程序所在的文件夹。 |
| /sbin | 系统管理员命令存放目录 | 存放标准系统管理员文件 |
| /dev | 存放设备文件 | 驱动文件等 |
U盘装Linux: CentOS
- 制作U盘启动盘
- 安装
自定义文件所在路径:选择ISO所在磁盘1
2
3
4
5
6
7Press Tab for full configuration options on menu items
vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 rd.live.check quiet
改为:
vmlinuz initrd=initrd.img linux dd quiet
查看U盘启动盘的名称
重启后:
vmlinuz initrd=initrd.img inst.stage2=hd:/dev/sdb4 quiet ps:/dev/sdb4就是你看到的启动盘名称
UEFI引导与BIOS引导
Warning: When dual-booting, avoid reformatting the ESP, as it may contain files required to boot other operating systems.
Keep in mind in here, maybe you have to configure disk form and booting system to GPT partition’s UEFI
EFI(ESP)
Copied from:EFI system partition
The EFI system partition (also called ESP) is an OS independent partition that acts as the storage place for the EFI bootloaders, applications and drivers to be launched by the UEFI firmware. It is mandatory for UEFI boot.
If you are installing Arch Linux on an UEFI-capable computer with an installed operating system, like Windows 10 for example, it is very likely that you already have an EFI system partition.
To find out the disk partition scheme and the system partition, use fdisk as root on the disk you want to boot from:
1 | fdisk -l /dev/sd* |
The command returns:
- The disk’s partition table: it indicates Disklabel type: gpt if the partition table is GPT or Disklabel type: dos if it is MBR.
- The list of partitions on the disk: Look for the EFI system partition in the list, it is a small (usually about 100–550 MiB) partition with a type EFI System or EFI (FAT-12/16/32). To confirm this is the ESP, mount it and check whether it contains a directory named EFI, if it does this is definitely the ESP.
create partition: efi
Warning: The EFI system partition must be a physical partition in the main partition table of the disk, not under LVM or software RAID etc.
To avoid potential problems with some UEFI implementations, the ESP should be formatted with FAT32 and the size should be at least 512 MiB. 550 MiB is recommended to avoid MiB/MB confusion and accidentally creating FAT16, although larger sizes are fine.
According to a Microsoft note, the minimum size for the EFI system partition (ESP) would be 100 MiB, though this is not stated in the UEFI Specification. Note that for Advanced Format 4K Native drives (4-KiB-per-sector) drives, the size is at least 256 MiB, because it is the minimum partition size of FAT32 drives (calculated as sector size (4KiB) x 65527 = 256 MiB), due to a limitation of the FAT32 file format.
Secure Boot
how do i install ubuntu alongside a pre installed windows with uefi
Before explaining the steps to do it, I want to be clear that I have tried many ways of installing Ubuntu with versions older than 15.04 (Or any other distro for that matter) from within Windows 8 or Windows 10. No luck. Microsoft Windows really created a big mess for all Linux distributions. If you have a pre-installed Windows 8 system, you will probably never be able to install Ubuntu or any other OS in the normal (LiveCD/LiveUSB) or Wubi way. This is because Windows 8 introduced several new features, of which 2 are:
- UEFI which substitutes what we have known as the BIOS (an alternative to)
- Secure Boot which prevents anything but the installed operating system, in this case, Windows 8 from booting. This is no longer the case for Ubuntu since 12.04.2 so there is no need to disable secure boot.
On a further note I want to mention something about Secure Boot taken from the UEFI Wiki
“Secure Boot” is a new UEFI feature that appeared in 2012, with Windows 8 preinstalled computers. Ubuntu supports this feature starting with 12.10 64 bit (see this article) and 12.04.2 64 bit, but as PCs implementing support for it have only become widespread at the end of 2012 it is not yet widely tested, so it’s possible that you may encounter problems booting Ubuntu under Secure Boot.
1 | once you've installed with Secure Boot disabled. As mentioned by slangasek: |
Installing Ubuntu
The following is a small guide to install Ubuntu with a Pre-Installed Windows 8 or 10 system. The steps HAVE TO BE done in the precise order I mention them here to get everything started. If a step is skipped or done before another, you will most likely end up with some of the problems mentioned at the bottom of this guide.
For the time, you need to do it via a LiveCD, LiveDVD or LiveUSB, assuming (actually requiring) you have the following points:
- Windows 8 was not shutdown in either Hibernation mode(休眠模式) or any other mode (‘fast start-up’ which is by default on Windows 8) that leaves it on a saved state. Shutdown Windows 8 in the normal way, with the shutdown option. This will prevent other problems related to this from appearing. Read the bottom (TROUBLESHOOT) of this answer for more information regarding this point.
- You are installing on an MS-DOS type(MBR) disk scheme (You can only have 4 primary partitions as opposed to GPT Scheme) which has at least 1 Free Primary Partition (You can find out the type of scheme you have from here if operating on an Ubuntu Live CD or here if from Windows). Remember that if you are already using 4 Primary Partitions no partitions will appear on the Ubuntu installer since there are no more Primary partitions left to use (MS-DOS type partitions are limited to 4 Primary ones; GPT are limited to 128 because of the limitation of Windows). This happens a lot on many laptops that come with 4 pre-created primary partitions. If you are installing on a GPT type partition and want it to boot, you need to leave UEFI enabled.
Before we start we need to do the following:
Runcompmgmt.mscon Windows 8. From there on, create a partition with enough size. Note that I mention creating this FROM Windows 8 because I have had cases where doing the partition from the LiveUSB rendered Windows 8 unbootable, even after doing a boot repair. So to remove that problem or have a greater chance of removing it (Or simply skipping the problem altogether) and making sure both systems work, partition your hard drive from within Windows 8 first.
Now follow this steps to have a working Windows 8 + Ubuntu installed on your system:
Windows 8 + Ubuntu
We first need to know with what type of motherboard options we are dealing with. Open a terminal (By going to the start menu and typing PowerShell for example) and run the terminal as an Administrator (Right Click the app that will show in the start menu and select Run as Administrator). Now type Confirm-SecureBootUEFI. This can give you 3 results:
1 | True - Means your system has a Secure boot and is Enabled |
If you have it Enabled and have the necessary partitioning done then we can proceed with this guide. After booting into Windows 8 we go to the power off options and while holding the SHIFT key, click on Restart.
Select UEFI Firmware Settings
NOTE - In the Spanish version of Windows 8, the option for UEFI Firmware Settings is not available in several laptops, tested Lenovo, HP, and Acer. They do have an option to boot the computer and another custom menu will appear which lets you do a couple of things. In the case of Lenovo, you will not have an option to install Ubuntu with Windows 8, the only option is to remove Windows 8 completely. This only applies if you are not using 15.04+.
THIS IS AN IMPORTANT PART
The system will reboot and you will be allowed to go to the BIOS (If not press the appropriate key, some common are DEL,F2 or F10).
In this part, I can’t help much since each BIOS is different for each Motherboard model. There are 2 options you can take here, both of which are optional since Ubuntu might install without any problems at all. You can either look for an option to disable Secure Boot or an option to disable UEFI. In some cases you will be able to find both, it will show in the BIOS as an option called Secure Boot or Enable UEFI.
If you find this options, then depending if you cannot install Ubuntu with Secure Boot enable then disable Secure Boot (Remember to report this as a bug using ubuntu-bug shim), to be able to still stay in UEFI mode and also be able to Boot with Ubuntu. In some motherboards, this will be the only option you actually need to change and also will be the only option you see related to UEFI because they will not offer the possibility to disable UEFI.
DUAL BOOT ISSUES
If you happen to install Ubuntu in Legacy Mode (No SecureBoot) you might have problems booting both, Windows and Ubuntu at the same time since they will both not appear on a Dual-Boot Menu. If you have Windows on UEFI for example and you install Ubuntu on Legacy Mode, you will only be able to boot to Ubuntu in Legacy Mode and Windows in UEFI Mode.
So before proceeding, make sure that** you are installing Ubuntu with the same boot options as Windows.** This way you will be able to choose which one to boot from in the same boot menu and not worry if one will work or not. From the Ubuntu UEFI Guide you can see that there is a section that teaches you how to know if you actually installed Ubuntu in the same Boot setup as Windows (UEFI Mode)
1 | An Ubuntu installed in EFI mode can be detected the following way: |
进入Cent OS后
1 | #gedit /boot/grub2/grub.cfg |
尝试多次,失败告终…
惨败收场solvedsolvedsolvedsolvedsolvedsolvedsolvedsolved
Cent OS下无法连接wifi(无线网卡:rtl8822be solved)
No WiFi Adapter found ~~
~~参照rtlwifi_new rtlwifi_next,编译失败 ~~
~~怀疑:This code will build on any kernel 4.2 and newer as long as the distro has not modified any of the kernel APIs.刚安装Cent OS 7.6 内核版本3.1
没有有线网,没有wifi,一台笔记本 jj … …
….
升级内核5.1后rtlwifi_new编译成功,成功安装
1 | sudo modprobe -r rtl8822be |
执行到此处时,出错(不明语句含义。。。 。。。)modprobe …
1 | lspci | grep Wireless |
无显示
solvedsolvedsolvedsolvedsolvedsolvedsolvedsolvedsolvedsolvedsolvedsolved
解决方法
Lenovo Legion Y7000P+Cent OS 7.6(kernel:5.)
1 | gedit /etc/modprobe.d/blacklist.conf |
具体含义… …
参考:
still-no-wifi-adapter-for-realtek-rtl8822be-found-in-18-04
联想拯救者 + ubuntu16.04 + WIFI设置
无线网卡无法使用的问题
联想笔记本安装ubuntu,无线网卡被禁用的问题及解决方法
USB共享手机网络
MIUI 系统
USB连接选项:仅限充电
设置:更多连接设置:USB网络共享
how to make my pci wifi card rtl8822 working on ubuntu
Lenovo A485:RTL8822BE-firmware
No WiFi adapter in ubuntu 18 04 LTS
…
内核升级
配置源
1 | # restore old yum mirrors |