Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to enable Intel Rapid Start in Linux system

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the knowledge of "how to enable Intel Rapid Start in the Linux system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

I. Intel Rapid Start principle

In fact, the principle of Intel Rapid Start is very simple, that is, it gives the computer the opportunity to enter deeper sleep (Deep Sleep) on the basis of traditional sleep (Sleep). Users can set a timeout through BIOS, such as one minute, ten minutes, half an hour, etc. (you can also set "immediately"). When the computer goes into sleep, the timing starts, and if the user wakes up the computer before the clock arrives, nothing happens. If the scheduled time is reached, the computer will be lightly woken up (wake up briefly), write the data in memory to a specific partition on the hard disk (official document refers to SSD), and then completely power off. After that, the user can only boot by pressing the power button, the motherboard firmware will read the contents of the specific partition back to memory, and then the computer can continue to use.

To sum up, the first half of Intel Rapid Start technology (IRST) is the same as normal sleep, while the second half is similar to Hibernate, but sleep is done by the operating system, while IRST is done by motherboard firmware (BIOS or UEFI). In other words, after the power-on self-test (POST), it is the process of reading content from the hard disk directly. There is no Boot loader and operating system loading process at all, so it is much faster than operating system-level hibernation, and even faster with the application of SSD, which is what Intel claims to be "six-second recovery." As far as I understand it, recovery is as fast as sleep, but power consumption is as low as dormancy (zero power consumption).

Intel's official documentation mentions that the technology requires SSD + Windows, but I don't see the need for it: SSD is for acceleration, and it's okay to slow down if you replace it with HDD, but what about Windows? Excitedly, Linux developer Matthew Garrett submitted a kernel patch in June 2013 to implement the support of the Linux kernel. This patch is already available in Linux 3.11, and as of the time of this writing, the latest Linux kernel version is 3.12.6, which is obviously available.

Second, adjust the zoning

My computer is the ThinkPad X240s, which has a SATA and two NGFF interfaces inside. The latter is a new interface pushed by Intel, which can be used to connect Bluetooth, 3G and other modules, as well as SSD of the NGFF interface. The ideal configuration should be that the SATA API is used to connect HDD and NGFF is used to connect SSD. This version is already configured with Intel Rapid Start. This version of my SATA interface is connected to a 500GB 7200 mechanical hard drive, one NGFF is connected to WiFi + Bluetooth, and the other NGFF is empty. In other words, without SSD, you can't use Intel Rapid Start by default. But is there no other way but a small and expensive NGFF SSD on Taobao? Of course not. If you read Intel Rapid Start's user manual carefully, you will find that it mentions that the motherboard firmware looks for IRST partitions through partition identifiers, D3BFE2DE-3DAF-11DF-BA-40-E3A556D89593 for GPT and 0x84 for MBR.

Before the adjustment, my partition structure was as follows:

The code is as follows:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

Sda 8:0 0 465,8G 0 disk

├─ sda1 8:1 0 2M 0 part

├─ sda2 8:2 0 200M 0 part / boot

├─ sda3 8:3 0 50G 0 part

│ └─ crypt-sda3 254:0 0 50G 0 crypt /

└── sda4 8:4 0 415,6G 0 part

└─ crypt-sda4 254:1 0 415,6G 0 crypt / home

The whole hard disk 465 GiB is divided into four sections using GPT, the first 2 MiB is used to store GRUB, then 200 MiB is / boot, then 50 GiB and /, and the last remaining 415.6 GiB is used as / home. Where sda3 and sda4 are both LUKS containers. My goal is to adjust the sda4 to 400 GiB, and then divide the remaining 15.6 GiB into sda5 as the IRST partition.

Because sda4 is a three-layer nested structure of GPT + LUKS + ext4, you need to shrink them one layer at a time, and then stretch them to the right place layer by layer.

The code is as follows:

# Uninstall / home

Umount / home

# you must check the file system before adjusting the file system

E2fsck-f / dev/mapper/crypt-sda4

# shrink the file system to 398 GiB

Resize2fs-p / dev/mapper/crypt-sda4 398G

# shrink the LUKS container to 399 GiB

# the block converted to 512 KiB is 399 * 1024 * 1024 * 2 = 836763648

Cryptsetup resize crypt-sda4 836763648

# adjust the sda4 partition to 400 GiB

# and use the remaining space to build sda5

# enter 8400 for partition identifier when it is established

Gdisk / dev/sda

# restart the computer so that the kernel uses the new partition table

Reboot

# Uninstall / home again

Umount / home

# enlarge the LUKS container to fill the sda4

Cryptsetup resize crypt-sda4

# check the file system

E2fsck-f / dev/mapper/crypt-sda4

# enlarge the file system to fill the LUKS container

Resize2fs-p / dev/mapper/crypt-sda4

# Mount Test

Mount / dev/mapper/crypt-sda4 / home

After the adjustment is completed, this is the effect:

The code is as follows:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

Sda 8:0 0 465,8G 0 disk

├─ sda1 8:1 0 2M 0 part

├─ sda2 8:2 0 200M 0 part / boot

├─ sda3 8:3 0 50G 0 part

│ └─ crypt-sda3 254:0 0 50G 0 crypt /

├─ sda4 8:4 0 400G 0 part

│ └─ crypt-sda4 254:1 0 400G 0 crypt / home

└─ sda5 8:5 0 15,6G 0 part

Number Start (sector) End (sector) Size Code Name

1 2048 6143 2.0 MiB EF02 BIOS boot partition

2 6144 415743 200.0 MiB 8300 Linux filesystem

3 415744 105273343 50.0 GiB 8300 LUKS partition

4 105273344 944134143 400.0 GiB 8300 LUKS partition

5 944134144 976773134 15.6 GiB 8400 Intel Rapid Start

3. Set motherboard firmware (BIOS/UEFI)

This step varies from manufacturer to manufacturer, but the main idea is to find the Intel Rapid Start setting in BIOS/UEFI and turn it on. Before completing the above steps, this option is not enabled and will indicate that a suitable storage device has not been found, but after completing the above steps, the firmware will find the IRST partition according to GUID, allowing this feature to be turned on. As for how long it will take to turn it on, it's a personal hobby. I chose "immediately", which is equivalent to using IRST instead of Sleep.

IV. Testing

In order to test the results, you can first use dd_rescue to clear the sda5: dd_rescue / dev/zero / dev/sda5. You can verify it with commands such as head-c 1G / dev/sda5.

Echo-n mem > / sys/power/state hangs the system to memory (S3, sleep) the → system sleeps smoothly → system is briefly awakened and the contents of memory are written into IRST partition, at this time, if you listen carefully, you can hear the sound written by the mechanical hard disk → write is complete, and the system is powered off.

After a power outage, the user can only wake up the computer by pressing the power button. After pressing the power button, you can observe a display similar to Resuming from deep sleep on the BIOS/UEFI. Words, indicating that the recovery process is done by firmware and has nothing to do with the operating system. After the recovery is complete, go straight back to the way you were before you went to sleep. At this point, a large amount of output can be observed using head / dev/sda5, indicating that the sda5 has indeed been written.

So far, the IRST has been successfully deployed.

This is the end of the content of "how to enable Intel Rapid Start in the Linux system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report