LoginSignup
0
0

More than 3 years have passed since last update.

nvme な Lenovo ideapad 330S で windows と linux との デュアルブート

Last updated at Posted at 2018-11-08

「万人の万人に対する戦い」は T.ホッブズの言葉。

彼は自然状態において自然権を行使することにより,「人は人に対して狼となる」ので,
自然状態は「万人の万人に対する戦い」の場にほかならないと考えた。
これを克服するために,
社会契約によって各人が同時に自然権を放棄し,
国家を形成し,この保護のもとに平和と安全を達成するしかないとの社会契約説が展開される。 

でも近くに

人は人に対して狼となり
万人の万人に対する戦いをしている

の国がある。

K女史は 世界は腹黒いといいます

1.png

かって暴力団対応の刑事さんとお話したことがあります。 話し方が 暴力団風でした。 つまり 暴力団対策をするには 彼らの思考法も身につける必要があります。 クラッカー対処も一緒です。  拡張主義の某国なら 日本に何をどう仕掛けたいのかを 相手の身になって 考える必要があります。 
バッテリーの残量を見るには
$ inxi -B

4万円台で買える m.2 ssd nvme なノートPCです。

 (2018/11/8のレノボ直販サイトで)

さよなら[ハードディスク] & [sataなm.2 ssd] ->こんにちは [pcieなnvme] かな


hdparm -t /dev/nvme0n1p6

/dev/nvme0n1p6:
Timing buffered disk reads: 2216 MB in 3.00 seconds = 738.47 MB/sec
モーレツに早い!

dd if=/dev/zero of=Zero--- bs=1M count=5000

5000+0 レコード入力
5000+0 レコード出力
5242880000 bytes (5.2 GB, 4.9 GiB) copied, 22.5517 s, 232 MB/s
raid 0 より遅いね

ちなみに SASハードディスク(15k)4台でつくった raid 0 では
# hdparm -t /dev/sdb1
/dev/sdb1:
SG_IO: bad/missing sense data, sb[]:  70 83 05 14 01 03 00 10 60 05 08 e0 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 Timing buffered disk reads: 1752 MB in  3.00 seconds = **583.65 **MB/sec
と読み込みは 20%位 負けるが


]# dd if=/dev/zero of=Zero--- bs=1M count=5000
5000+0 レコード入力
5000+0 レコード出力
5242880000 bytes (5.2 GB, 4.9 GiB) copied, 8.01978 s, **654** MB/s
書き込みは 3倍位はやい



最初archmanをいれようとしましたが、これだめでした
そのため debianよりもubuntuよりも ハードウェアサポートが多いと 自分か考えている MX linux を選びました

a.jpg

と デュアルブートです

動いてる姿は ここ https://www.youtube.com/watch?v=UbXa6rxIipY です

全体の風景は

b.jpg

解体新書は以下です

まず分解ですが 取説から
1.jpg

ユーチューブの動画では以下
https://www.youtube.com/watch?v=S70CLZi24a8

中をいじるのであれば バッテリーを切り離しておく必要があります
よって
b.jpg

3.jpg

2.jpg

以下な感じです

# dmesg | grep nvme
[    1.442521] nvme nvme0: pci function 0000:02:00.0
[    1.660318]  nvme0n1: p1 p2 p3 p4 p5 p6
[    2.054119] EXT4-fs (nvme0n1p6): mounted filesystem with ordered data mode. Opts: (null)
[    4.206229] EXT4-fs (nvme0n1p6): re-mounted. Opts: (null)
[    7.117501] Adding 4194300k swap on /dev/nvme0n1p5.  Priority:-2 extents:1 across:4194300k SSFS






# gdisk -l /dev/nvme0n1
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/nvme0n1: 250069680 sectors, 119.2 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): F64FED7A-B3F6-4F4B-88FE-DC55ABC8DF48
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 250069646
Partitions will be aligned on 2048-sector boundaries
Total free space is 8813 sectors (4.3 MiB)
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          534527   260.0 MiB   EF00  EFI system partition
   2          534528          567295   16.0 MiB    0C01  Microsoft reserved ...
   3          573440       102973439   48.8 GiB    0700  Basic data partition
   4       248020992       250068991   1000.0 MiB  2700  Basic data partition
   5       102973440       111362047   4.0 GiB     8200  Linux swap
   6       111362048       248020991   65.2 GiB    8303  Linux x86 root (/)




$ df
ファイルシス   1K-ブロック    使用   使用可 使用% マウント位置
udev               1958668       0  1958668    0% /dev
tmpfs               394988    1368   393620    1% /run
/dev/nvme0n1p6    66731432 5922104 57376472   10% /
tmpfs                 5120       4     5116    1% /run/lock
tmpfs               789960       0   789960    0% /run/shm
/dev/nvme0n1p1      262144   29184   232960   12% /boot/efi
cgroup                  12       0       12    0% /sys/fs/cgroup
tmpfs               394984       4   394980    1% /run/user/115
tmpfs               394984       8   394976    1% /run/user/1000


# hdparm -t /dev/nvme0n1p6
/dev/nvme0n1p6:
 Timing buffered disk reads: 2244 MB in  3.00 seconds = 747.52 MB/sec
あれれ、 1G いってないですねー、 残念。 でも m.2 ssd(sata) より速い!






詳しくは https://hatahata-linux.blogspot.com/2018/11/mvme-lenovo-ideapad-330s-win10-mx-linux.html に書きました
なおnvmeは以下のように認識されてます

a.jpg
b.jpg

# grubは以下です

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

### 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

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

export menuentry_id_option

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

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  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
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
else
  search --no-floppy --fs-uuid --set=root 7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=ja_JP
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
else
  search --no-floppy --fs-uuid --set=root 7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
fi
insmod png
if background_image /usr/share/backgrounds/MXLinux/grub/MX-Gold1080P.png; then
  true
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
    set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'MX 17 Horizon' --class mx --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-7d0a0241-f00d-48cb-ac5d-f650a8f6cf37' {
    load_video
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_gpt
    insmod ext2
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root  7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
    else
      search --no-floppy --fs-uuid --set=root 7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
    fi
    echo    'Linux 4.15.0-1-amd64 をロード中...'
    linux   /boot/vmlinuz-4.15.0-1-amd64 root=UUID=7d0a0241-f00d-48cb-ac5d-f650a8f6cf37 ro  zswap.zpool=zsmalloc BOOT_IMAGE=/antiX/vmlinuz quiet
    echo    '初期 RAM ディスクをロード中...'
    initrd  /boot/initrd.img-4.15.0-1-amd64
}
submenu 'Advanced options for MX 17 Horizon' $menuentry_id_option 'gnulinux-advanced-7d0a0241-f00d-48cb-ac5d-f650a8f6cf37' {
    menuentry 'MX 17 Horizon, with Linux 4.15.0-1-amd64' --class mx --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-1-amd64-advanced-7d0a0241-f00d-48cb-ac5d-f650a8f6cf37' {
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
        else
          search --no-floppy --fs-uuid --set=root 7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
        fi
        echo    'Linux 4.15.0-1-amd64 をロード中...'
        linux   /boot/vmlinuz-4.15.0-1-amd64 root=UUID=7d0a0241-f00d-48cb-ac5d-f650a8f6cf37 ro  zswap.zpool=zsmalloc BOOT_IMAGE=/antiX/vmlinuz quiet
        echo    '初期 RAM ディスクをロード中...'
        initrd  /boot/initrd.img-4.15.0-1-amd64
    }
    menuentry 'MX 17 Horizon, with Linux 4.15.0-1-amd64 (systemd)' --class mx --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-1-amd64-init-systemd-7d0a0241-f00d-48cb-ac5d-f650a8f6cf37' {
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_gpt
        insmod ext2
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
        else
          search --no-floppy --fs-uuid --set=root 7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
        fi
        echo    'Linux 4.15.0-1-amd64 をロード中...'
        linux   /boot/vmlinuz-4.15.0-1-amd64 root=UUID=7d0a0241-f00d-48cb-ac5d-f650a8f6cf37 ro  zswap.zpool=zsmalloc BOOT_IMAGE=/antiX/vmlinuz quiet init=/lib/systemd/systemd
        echo    '初期 RAM ディスクをロード中...'
        initrd  /boot/initrd.img-4.15.0-1-amd64
    }
}

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

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

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

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    insmod part_gpt
    insmod ext2
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root  7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
    else
      search --no-floppy --fs-uuid --set=root 7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
    fi
    linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod part_gpt
    insmod ext2
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root  7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
    else
      search --no-floppy --fs-uuid --set=root 7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
    fi
    linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
menuentry "Memory test (memtest86+, experimental multiboot)" {
    insmod part_gpt
    insmod ext2
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root  7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
    else
      search --no-floppy --fs-uuid --set=root 7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
    fi
    multiboot   /boot/memtest86+_multiboot.bin
}
menuentry "Memory test (memtest86+, serial console 115200, experimental multiboot)" {
    insmod part_gpt
    insmod ext2
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root  7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
    else
      search --no-floppy --fs-uuid --set=root 7d0a0241-f00d-48cb-ac5d-f650a8f6cf37
    fi
    multiboot   /boot/memtest86+_multiboot.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-CC9F-4FD3' {
    insmod part_gpt
    insmod fat
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root  CC9F-4FD3
    else
      search --no-floppy --fs-uuid --set=root CC9F-4FD3
    fi
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_os-prober ###


だども mx linux は バッテリー残量表示がクールでないので 今はarchman に代えてます

$ ls -l /boot/efi/EFI/
total 16K
drwxr-xr-x 2 root root 4.0K 5月 4 2019 Archman
drwxr-xr-x 2 root root 4.0K 9月 1 2018 Boot
drwxr-xr-x 4 root root 4.0K 9月 1 2018 Microsoft
drwxr-xr-x 2 root root 4.0K 11月 9 06:08 MX17

1.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0