imac sonoma 14で、isoファイルをUSBに書き込みたい

よくmacosの手順では、isoファイルを選択した状態でFinderから書き込みを選べばいい、

と出るが、こちらのiMacではそのような選択肢はない。

ディスクユーティリティから行こうとしても書き込めそうにない。

仕方ないのでコマンドでなんとかする。

まず、書き込み先のUSBはどこにいる事なっているのか、調べるために

%diskutil list

コマンドを使うと /dev/disk4 という事になっている。

% diskutil list

/dev/disk0 (internal, physical):

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *500.3 GB   disk0

   1:             Apple_APFS_ISC Container disk1         524.3 MB   disk0s1

   2:                 Apple_APFS Container disk3         494.4 GB   disk0s2

   3:        Apple_APFS_Recovery Container disk2         5.4 GB     disk0s3

 

/dev/disk3 (synthesized):

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      APFS Container Scheme -                      +494.4 GB   disk3

                                 Physical Store disk0s2

   1:                APFS Volume Macintosh HD            9.8 GB     disk3s1

   2:              APFS Snapshot com.apple.os.update-... 9.8 GB     disk3s1s1

   3:                APFS Volume Preboot                 5.7 GB     disk3s2

   4:                APFS Volume Recovery                885.9 MB   disk3s3

   5:                APFS Volume Data                    64.9 GB    disk3s5

   6:                APFS Volume VM                      20.5 KB    disk3s6

 

/dev/disk4 (external, physical):

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:     FDisk_partition_scheme                        *124.9 GB   disk4

   1:                  Apple_HFS 名称未設定              124.9 GB   disk4s1

 

それから、書き込もうとしているisoファイルの場所まで移動する。

% cd 04_OS

「04_OS」という名前のフォルダに置いております。

lsコマンドを打つと、目的のisoファイルがある。VMware〜のファイルが今回の目的。

% ls

VMware-VMvisor-Installer-7.0U3n-21930508.x86_64.iso

rhel-8.7-x86_64-boot.iso

ubuntu-22.04.3-live-server-arm64.iso

 

書き込みコマンドを打つ

% dd if=VMware-VMvisor-Installer-7.0U3n-21930508.x86_64.iso of=/dev/disk4

 

すると警告がでる。OKを押下する。

dd: /dev/disk4: Permission denied

という事で、権限不足であったので、sudoを加えて打ち直す。

% sudo dd if=VMware-VMvisor-Installer-7.0U3n-21930508.x86_64.iso of=/dev/disk4

Password:

dd: /dev/disk4: Resource busy

パスワードを入れたら今度は「Resource busy」となった。

 

https://blog.mothule.com/linux/linux-write-iso-to-usb-flash-drive

のサイトを参考に、まずはUSBを初期化する。ブロックサイズの指定オプションを付け忘れたが。

% diskutil eraseDisk MS-DOS UNTITLED /dev/disk4     

Started erase on disk4

Unmounting disk

Creating the partition map

Waiting for partitions to activate

Formatting disk4s2 as MS-DOS (FAT) with name UNTITLED

512 bytes per physical sector

/dev/rdisk4s2: 243545984 sectors in 3805406 FAT32 clusters (32768 bytes/cluster)

bps=512 spc=64 res=32 nft=2 mid=0xf8 spt=32 hds=255 hid=411648 drv=0x80 bsec=243605504 bspf=29730 rdcl=2 infs=1 bkbs=6

Mounting disk

Finished erase on disk4

そしてUSBをアンマウントする。

% diskutil unmountDisk /dev/disk4

Unmount of all volumes on disk4 was successful

 

そしてもう一度、書き込みコマンドを打つ

% dd if=VMware-VMvisor-Installer-7.0U3n-21930508.x86_64.iso of=/dev/disk4

 

すると、

% sudo dd if=VMware-VMvisor-Installer-7.0U3n-21930508.x86_64.iso of=/dev/disk4

782432+0 records in

782432+0 records out

400605184 bytes transferred in 28.736537 secs (13940621 bytes/sec)

という事で、やっと書き込めた。

 

しかし、

なぜGUIで簡単にできないのだろうか。

そこだけが疑問なのだ。

UC-SGTを活用する

Windows XPの頃によく使っていたSerial-USB変換ケーブルは、Windows10になってから出番がなくなった。

でも捨てるのも勿体無い。

Linuxで使えるかを確認する。

Raspberry Piに挿してしばらく待って、

$ dmesg | grep tty

と打つと

[ 2897.176688] usb 1-1.3: pl2303 converter now attached to ttyUSB0

として、ttyUSB0で認識をしてもらえた。

Cisco1812-Jを繋いで

$ screen /dev/ttyUSB0

を打ち、Enterキーを数回押すとRouterのコンソールとして表示された。

screenから抜けるには「Ctrl+a」を押してから一度離し、「¥(バックスラッシュキー)」

を打つと、screenを終了するか聞かれるので、Yキーを押して抜ける。

 

US-SGTはRaspberry Piで使うようにして延命した。

 

cupsのissueに関する通知が表示された。

apt-listchanges: ニュース

---------------------

 

cups (2.3.3op2-3+deb11u4) bullseye; urgency=medium

 

  This release addresses a security issue (CVE-2023-32360) which allows

  unauthorized users to fetch documents over local or remote networks.

  Since this is a configuration fix, it might be that it does not reach you if you

  are updating 'cups-daemon' (rather than doing a fresh installation).

  Please double check your /etc/cups/cupsd.conf file, whether it limits the access

  to CUPS-Get-Document with something like the following

  >  <Limit CUPS-Get-Document>

  >    AuthType Default

  >    Require user @OWNER @SYSTEM

  >    Order deny,allow

  >   </Limit>

  (The important line is the 'AuthType Default' in this section)

 

 -- Thorsten Alteholz <debian@alteholz.de>  Tue, 19 Sep 2023 21:20:27 +0200

 

という表示が出てきた。

とりあえず /etc/cups/cupsd.conf がいまどうなっているのかは見ておく。

が、そもそもcupsが何をやっているプログラムなのかを知らないのだが。

 

https://github.com/OpenPrinting/cups/commit/a0c8b9c9556882f00c68b9727a95a1b6d1452913

をみると、ちょっと削除して置き換えるべき構文があるようなので、

$ sudo vi /etc/cups/cupsd.conf 

から、何もわかってないが言われたところ置き換えておく。

 

USB-RSAQ3

Raspberry piでOSバージョン確認

$uname -a

Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux

とでる。

 

Raspberry piにUSB-RSAQ3を接続する。

$dmesg | grep tty

[   81.871441] usb 1-1.4: pl2303 converter now attached to ttyUSB0

と表示される。

ttyUSB0として認識はしてくれた様子。

 

$screen /dev/ttyUSB0

bash: screen: コマンドが見つかりません

コマンドが見つかりません。

と言われる。

 

ではインストールするか、と思い

$ sudo apt instatt screen

と入れると、

$ sudo apt install screen

パッケージリストを読み込んでいます... エラー!

E: Problem parsing dependency 2 of lynx-common:all=2.9.0dev.6-3~deb11u1

E: lynx-common を処理中にエラーが発生しました (NewVersion2)

E: Problem with MergeList /var/lib/apt/lists/deb.debian.org_debian_dists_bullseye_main_binary-arm64_Packages

E: パッケージリストまたはステータスファイルを解釈またはオープンすることができません。

となる。

 

apt updateでも試してみるか、と

$ sudo apt update

を入れると、

$ sudo apt update

ヒット:1 http://deb.debian.org/debian bullseye InRelease

取得:2 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]           

ヒット:3 http://security.debian.org/debian-security bullseye-security InRelease    

ヒット:4 http://archive.raspberrypi.org/debian bullseye InRelease                                             

44.1 kB を 4秒 で取得しました (10.1 kB/s)

パッケージリストを読み込んでいます... エラー!

E: Problem parsing dependency 2 of lynx-common:all=2.9.0dev.6-3~deb11u1

E: lynx-common を処理中にエラーが発生しました (NewVersion2)

E: Problem with MergeList /var/lib/apt/lists/deb.debian.org_debian_dists_bullseye_main_binary-arm64_Packages

E: パッケージリストまたはステータスファイルを解釈またはオープンすることができません。

 

とりあえずわからんので、

/var/lib/apt/lists/deb.debian.org_debian_dists_bullseye_main_binary-arm64_Packages

を削除してしまう事にした。

$ sudo rm /var/lib/apt/lists/deb.debian.org_debian_dists_bullseye_main_binary-arm64_Packages

 

その後に sudo apt update は素直に通った。

では screen を入れようか、という事だが先ず探してみる。

 

$ sudo apt search screen
ーーー

screen/oldstable 4.8.0-6 arm64

  VT100/ANSI 端末エミュレーションを備えた端末マルチプレクサ

と出た。

インストールする

$ sudo apt install screen

 

インストールできたので早速使う。

$ screen /dev/ttyUSB0

ちなみにSerial Consoleで繋いでいるのはCisco 1812-Jである。

R-001>

となったので、無事ログインできた。

 

が、Screenの終わり方がわからない。

 

わかった。

「Ctrl + a」押した後、一度離し、「¥(バックスラッシュのキー)」を押すと

Really quit and kill all your windows [y/n]

と聞かれるので「y」を押すと、少しして画面が閉じ、linuxのコンソールに戻る。

 

 

 

 

Planeが4つ

Planeが4つ
・Control Plane(Routing table,MAC table処理、経路制御、ルータ宛通信処理)
・Date Plane(配送処理、カプセル化acl)
・Back Plane
・Management Plane
※プロセススイッチングは常にControl planeで処理、ファストスイッチングは2個目から
 Data Plane処理、CEFは最初からData Planeのみで処理
 物理インターフェイスで送受信配送するのがBack Plane

ルータ


・RIB(Routing Information Base)
IPパケットの転送方式はいくつかある。
・プロセススイッチング ※packet一つずつテーブル確認して配送
・ファストスイッチング ※最初のpacket配送後、後続はテーブル確認省略
・CEF(Cisco Express Forwarding)

errdisable調整

特定のerrを検出しないようにするときは
(config)#no errdisable detect cause <err対象>
noを付けない場合は逆に「指定のerrだけ検出させる」となる。
自動復旧させているかの確認は
#show errdisable recovery
自動復旧設定したいときは
(config)#errdisable recovery cause <err対象>
デフォルト300 secondsで自動復旧だが、秒数指定したいときは
(config)#errdisable recovery interval <seconds>