chown  [chang
owner]:纠正文件的属主,也正是钦赐文件的具备者改为另多少个钦命的客户或组。

==========================================UBUNTU
 /boot/grub/grub.conf文件==========================================

第1章 Linux运维进度

开机自检(BIOS卡塔 尔(阿拉伯语:قطر‎##硬件检查

MBR引导

GRUB菜单(选拔差异的基业卡塔尔国

加载内核

运行init进度(Linux系统里面第叁个经过卡塔 尔(阿拉伯语:قطر‎

读取/etc/inittab配置文件(读取运维品级卡塔 尔(阿拉伯语:قطر‎

执行/etc/rc.d/sysinit脚本(系统的伊始化脚本 设置IP地址卡塔尔国

试行/etc/rc.d/rc脚本(根据系统的运营等第 在开机的时候运行差别的软件卡塔尔国

启动mingetty进程

来得分界面

指令格式:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

第2章 PATH 变量

PATH 贮存的是Linux下命令的地点

[root@oldboyedu-50 ~]# echo $PATH 
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

规律
/bin
/sbin
/usr/bin
/usr/sbin
/usr/local/bin
/usr/local/sbin

Linux实行命令的经过

是或不是是外号

在PATH中找命令是不是存在

      没有的话提示command not fonund

      有就进行

 

    chown [选项]… [用户][:[组]] 文件…

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ “${next_entry}” ] ; then
set default=”${next_entry}”
set next_entry=
save_env next_entry
set boot_once=true
else
set default=”0″
fi

第3章 展现超级目录

问题:

怎么着过滤出已知当前目录下oldboy中的全数拔尖目录

(提示:不包括oldboy目录上边目录的子目录及藏匿目录,即只好是一流目录)?

创建环境
mkdir /oldboy -p
cd /oldboy
mkdir ext/oldboy test xiaodong xiaofan xingfujie -p
touch jeacen oldboy wodi.gz yingsui.gz

例子:  sudo chown book:book  /work  -R  

if [ x”${feature_menuentry_id}” = xy ]; then
menuentry_id_option=”–id”
else
menuentry_id_option=””
fi

3.1 方法一 tree

-d  只展现目录

-L level 最多展现多少层 -L 1 最多展现意气风发层

[root@oldboyedu-50 oldboy]# tree -dL 1
.
├── ext
├── test
├── xiaodong
├── xiaofan
└── xingfujie

5 directories

   
-R[recursion]:递归地转移该目录下的全部文件 

export menuentry_id_option

3.2 方法二 find

-maxdepth  最大的深浅

-maxdepth  最大的深度
[root@oldboyedu-50 oldboy]# find -maxdepth 1 -type d
.                                                    显示出了目录 但是多了一个.
./xingfujie
./test
./xiaofan
./xiaodong
./ext

!驱除取反 非

排除. 只显示目录
[root@oldboyedu-50 oldboy]# find -maxdepth 1 -type d ! -name "."
./xingfujie
./test
./xiaofan
./xiaodong
./ext

 常常在没利用上命令时,该子目录work都以归root客商和root组具有。

if [ “${prev_saved_entry}” ]; then
set saved_entry=”${prev_saved_entry}”
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

3.3 方法三grep

^以xxx/开端的行  三杀手使用 正则表明式

[root@oldboyedu-50 oldboy]# ls -l |grep "^d"
drwxr-xr-x. 3 root root 4096 Jul 10 19:45 ext
drwxr-xr-x. 2 root root 4096 Jul 10 19:45 test
drwxr-xr-x. 2 root root 4096 Jul 10 19:45 xiaodong
drwxr-xr-x. 2 root root 4096 Jul 10 19:45 xiaofan
drwxr-xr-x. 2 root root 4096 Jul 10 19:45 xingfujie
^以xxx/开头的行  三剑客使用 正则表达式

输入 ls -ld work
命令,然后列出该work目录详细内容,从下图中得以观察该目录权限都归root管理。

function savedefault {
if [ -z “${boot_once}” ]; then
saved_entry=”${chosen}”
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n “${have_grubenv}” ]; then if [ -z “${boot_once}” ]; then
save_env recordfail; fi; fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

3.4 方法四awk

$2表示第二列

[root@oldboyedu-50 oldboy]# ls -l |awk '$2>1'                第二列大于一的
total 20
drwxr-xr-x. 3 root root 4096 Jul 10 19:45 ext
drwxr-xr-x. 2 root root 4096 Jul 10 19:45 test
drwxr-xr-x. 2 root root 4096 Jul 10 19:45 xiaodong
drwxr-xr-x. 2 root root 4096 Jul 10 19:45 xiaofan
drwxr-xr-x. 2 root root 4096 Jul 10 19:45 xingfujie

 图片 1

if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
font=”/usr/share/grub/unicode.pf2″
fi

3.5 扩充方法三种

[root@oldboyedu-50 oldboy]# ls -F |grep "/"
-F 不同的类型文件 加上不同的标记  目录加上/

[root@oldboyedu-50 oldboy]# ls -ld */  ##看以/结尾的

 

if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ “${recordfail}” = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=hidden
set timeout=0
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep –interruptible 0 ; then
set timeout=0
fi
fi
### END /etc/grub.d/00_header ###

第4章 压缩

问题:

/etc/目录为linux系统的默许的配备文件及劳动运营命令的目录

       a.请用tar打包/etc整个目录(打包及收缩卡塔 尔(阿拉伯语:قطر‎

      
b.请用tar打包/etc整个目录(打包及收缩,但必要灭亡/etc/services文件卡塔尔国

      
c.请把a点命令的压缩包,解压到/tmp钦点目录下(最佳只用tar命令完结卡塔 尔(英语:State of Qatar)

应用了sudo chown book:book  /work  -中华V 后,该work目录以至work目录下具有成员都会归book客户和book组具备,如下图,再次输入ls
-ld work
命令,能够见到work该目录权限都归book处理,那样book客商就会写入文件和读取文件。

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

4.1 tar下的参数

tar zcvf /tmp/etc.tar.gz  /etc/
         压缩之后放在哪   要压缩的
    z  gzip    通过gzip软件压缩
    c  create  创建包
    v  verbose 显示过程
    f  file    指定文件 (在tar中  f 必须要在最后边)
    t  list    显示压缩包内容
    x  extaact 解压
压缩  zcvf  zcf
查看  ztf   tf
解压  zxf   xf

 图片 2

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload=”${1}”
if [ “${1}” = “keep” ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ “${recordfail}” != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry ‘Ubuntu’ –class ubuntu –class gnu-linux –class gnu –class
os $menuentry_id_option
‘gnulinux-simple-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’ {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
linux /boot/vmlinuz-4.4.0-72-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro
find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US
quiet
initrd /boot/initrd.img-4.4.0-72-generic
}
submenu ‘Advanced options for Ubuntu’ $menuentry_id_option
‘gnulinux-advanced-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’ {
menuentry ‘Ubuntu, with Linux 4.4.0-72-generic’ –class ubuntu –class
gnu-linux –class gnu –class os $menuentry_id_option
‘gnulinux-4.4.0-72-generic-advanced-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’
{
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
echo ‘Loading Linux 4.4.0-72-generic …’
linux /boot/vmlinuz-4.4.0-72-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro
find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US
quiet
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-4.4.0-72-generic
}
menuentry ‘Ubuntu, with Linux 4.4.0-72-generic (recovery mode)’ –class
ubuntu –class gnu-linux –class gnu –class os $menuentry_id_option
‘gnulinux-4.4.0-72-generic-recovery-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’
{
recordfail
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
echo ‘Loading Linux 4.4.0-72-generic …’
linux /boot/vmlinuz-4.4.0-72-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro recovery nomodeset
find_preseed=/preseed.cfg auto noprompt priority=critical
locale=en_US
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-4.4.0-72-generic
}
menuentry ‘Ubuntu, with Linux 4.4.0-66-generic’ –class ubuntu –class
gnu-linux –class gnu –class os $menuentry_id_option
‘gnulinux-4.4.0-66-generic-advanced-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’
{
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
echo ‘Loading Linux 4.4.0-66-generic …’
linux /boot/vmlinuz-4.4.0-66-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro
find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US
quiet
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-4.4.0-66-generic
}
menuentry ‘Ubuntu, with Linux 4.4.0-66-generic (recovery mode)’ –class
ubuntu –class gnu-linux –class gnu –class os $menuentry_id_option
‘gnulinux-4.4.0-66-generic-recovery-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’
{
recordfail
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
echo ‘Loading Linux 4.4.0-66-generic …’
linux /boot/vmlinuz-4.4.0-66-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro recovery nomodeset
find_preseed=/preseed.cfg auto noprompt priority=critical
locale=en_US
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-4.4.0-66-generic
}
menuentry ‘Ubuntu, with Linux 4.4.0-64-generic’ –class ubuntu –class
gnu-linux –class gnu –class os $menuentry_id_option
‘gnulinux-4.4.0-64-generic-advanced-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’
{
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
echo ‘Loading Linux 4.4.0-64-generic …’
linux /boot/vmlinuz-4.4.0-64-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro
find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US
quiet
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-4.4.0-64-generic
}
menuentry ‘Ubuntu, with Linux 4.4.0-64-generic (recovery mode)’ –class
ubuntu –class gnu-linux –class gnu –class os $menuentry_id_option
‘gnulinux-4.4.0-64-generic-recovery-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’
{
recordfail
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
echo ‘Loading Linux 4.4.0-64-generic …’
linux /boot/vmlinuz-4.4.0-64-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro recovery nomodeset
find_preseed=/preseed.cfg auto noprompt priority=critical
locale=en_US
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-4.4.0-64-generic
}
menuentry ‘Ubuntu, with Linux 4.4.0-59-generic’ –class ubuntu –class
gnu-linux –class gnu –class os $menuentry_id_option
‘gnulinux-4.4.0-59-generic-advanced-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’
{
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
echo ‘Loading Linux 4.4.0-59-generic …’
linux /boot/vmlinuz-4.4.0-59-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro
find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US
quiet
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-4.4.0-59-generic
}
menuentry ‘Ubuntu, with Linux 4.4.0-59-generic (recovery mode)’ –class
ubuntu –class gnu-linux –class gnu –class os $menuentry_id_option
‘gnulinux-4.4.0-59-generic-recovery-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’
{
recordfail
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
echo ‘Loading Linux 4.4.0-59-generic …’
linux /boot/vmlinuz-4.4.0-59-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro recovery nomodeset
find_preseed=/preseed.cfg auto noprompt priority=critical
locale=en_US
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-4.4.0-59-generic
}
menuentry ‘Ubuntu, with Linux 4.4.0-57-generic’ –class ubuntu –class
gnu-linux –class gnu –class os $menuentry_id_option
‘gnulinux-4.4.0-57-generic-advanced-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’
{
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
echo ‘Loading Linux 4.4.0-57-generic …’
linux /boot/vmlinuz-4.4.0-57-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro
find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US
quiet
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-4.4.0-57-generic
}
menuentry ‘Ubuntu, with Linux 4.4.0-57-generic (recovery mode)’ –class
ubuntu –class gnu-linux –class gnu –class os $menuentry_id_option
‘gnulinux-4.4.0-57-generic-recovery-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’
{
recordfail
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
echo ‘Loading Linux 4.4.0-57-generic …’
linux /boot/vmlinuz-4.4.0-57-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro recovery nomodeset
find_preseed=/preseed.cfg auto noprompt priority=critical
locale=en_US
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-4.4.0-57-generic
}
menuentry ‘Ubuntu, with Linux 4.4.0-53-generic’ –class ubuntu –class
gnu-linux –class gnu –class os $menuentry_id_option
‘gnulinux-4.4.0-53-generic-advanced-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’
{
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
echo ‘Loading Linux 4.4.0-53-generic …’
linux /boot/vmlinuz-4.4.0-53-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro
find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US
quiet
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-4.4.0-53-generic
}
menuentry ‘Ubuntu, with Linux 4.4.0-53-generic (recovery mode)’ –class
ubuntu –class gnu-linux –class gnu –class os $menuentry_id_option
‘gnulinux-4.4.0-53-generic-recovery-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’
{
recordfail
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
echo ‘Loading Linux 4.4.0-53-generic …’
linux /boot/vmlinuz-4.4.0-53-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro recovery nomodeset
find_preseed=/preseed.cfg auto noprompt priority=critical
locale=en_US
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-4.4.0-53-generic
}
menuentry ‘Ubuntu, with Linux 4.4.0-45-generic’ –class ubuntu –class
gnu-linux –class gnu –class os $menuentry_id_option
‘gnulinux-4.4.0-45-generic-advanced-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’
{
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
echo ‘Loading Linux 4.4.0-45-generic …’
linux /boot/vmlinuz-4.4.0-45-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro
find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US
quiet
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-4.4.0-45-generic
}
menuentry ‘Ubuntu, with Linux 4.4.0-45-generic (recovery mode)’ –class
ubuntu –class gnu-linux –class gnu –class os $menuentry_id_option
‘gnulinux-4.4.0-45-generic-recovery-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’
{
recordfail
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
echo ‘Loading Linux 4.4.0-45-generic …’
linux /boot/vmlinuz-4.4.0-45-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro recovery nomodeset
find_preseed=/preseed.cfg auto noprompt priority=critical
locale=en_US
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-4.4.0-45-generic
}
menuentry ‘Ubuntu, with Linux 4.4.0-42-generic’ –class ubuntu –class
gnu-linux –class gnu –class os $menuentry_id_option
‘gnulinux-4.4.0-42-generic-advanced-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’
{
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
echo ‘Loading Linux 4.4.0-42-generic …’
linux /boot/vmlinuz-4.4.0-42-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro
find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US
quiet
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-4.4.0-42-generic
}
menuentry ‘Ubuntu, with Linux 4.4.0-42-generic (recovery mode)’ –class
ubuntu –class gnu-linux –class gnu –class os $menuentry_id_option
‘gnulinux-4.4.0-42-generic-recovery-87f8333a-b6dc-49f7-89f9-ef6a91eb756b’
{
recordfail
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root=’hd0,msdos1′
if [ x$feature_platform_search_hint = xy ]; then
search –no-floppy –fs-uuid –set=root –hint-bios=hd0,msdos1
–hint-efi=hd0,msdos1 –hint-baremetal=ahci0,msdos1
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
else
search –no-floppy –fs-uuid –set=root
87f8333a-b6dc-49f7-89f9-ef6a91eb756b
fi
echo ‘Loading Linux 4.4.0-42-generic …’
linux /boot/vmlinuz-4.4.0-42-generic
root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro recovery nomodeset
find_preseed=/preseed.cfg auto noprompt priority=critical
locale=en_US
echo ‘Loading initial ramdisk …’
initrd /boot/initrd.img-4.4.0-42-generic
}
}

4.2 创设压缩包

相通减去不用参数v  不用展现压缩进度 所以直接用zcf就可以

[root@oldboyedu-50 tmp]# tar ztf /tmp/etc.tar.gz   打包及压缩

 

### END /etc/grub.d/10_linux ###

4.3 解压

解压前先走入要解压到的目录

[root@oldboyedu-50 tmp]# tar zxf etc.tar.gz   ##先进入tmp目录

    

### BEGIN /etc/grub.d/20_linux_xen ###

4.4 解压到钦命目录

解压使用参数zxf  z能够省略 xf就可以

[root@oldboyedu-50 tmp]# tar xf /tmp/etc.tar.gz -C /opt/  解压到opt目录
[root@oldboyedu-50 tmp]# ll /opt/                         解压后检查
total 8
drwxr-xr-x. 78 root root 4096 Jul 10 19:41 etc
drwxr-xr-x.  2 root root 4096 Mar 26  2015 rh

发表评论

电子邮件地址不会被公开。 必填项已用*标注