Как указать альтернативную корневую файловую систему во время загрузки

Я бы предложил awk подход:

awk 'NR>1 && NF{$0="{p}" RS $0 RS "{/p}"}1' file

Вывод:

Section 5. General Information About Project Gutenberg-tm electronic works.

{p}
Description
{/p}

{p}
Professor Michael S. Hart is the originator of the Project Gutenberg-tm concept of a library of electronic works that could be freely shared with anyone. For thirty years, he produced and distributed Project Gutenberg-tm eBooks with only a loose network of volunteer support.
{/p}

{p}
Project Gutenberg-tm eBooks are often created from several printed editions, all of which are confirmed as Public Domain in the U.S. unless a copyright notice is included. Thus, we do not necessarily keep eBooks in compliance with any particular paper edition.
{/p}

RS - разделитель записей awk, по умолчанию новая строка \n

NR>1 - пропускает первую строку header

NF - указывает на общее количество полей строки (с учетом непустых строк)

1
08.11.2016, 17:45
1 ответ

Это зависит от используемого вами загрузчика. Если вы используете GRUB, то нажмите e, когда появится меню, и добавьте изменение параметра rootfs в строке linux.

Пример

linux /boot/vmlinuz-linux root=/dev/sdb1 quiet splash
0
28.01.2020, 01:07

Теги

Похожие вопросы