惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
Jina AI
Jina AI
雷峰网
雷峰网
博客园_首页
WordPress大学
WordPress大学
博客园 - 司徒正美
爱范儿
爱范儿
博客园 - 聂微东
IT之家
IT之家
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tailwind CSS Blog
博客园 - Franky
V
V2EX
GbyAI
GbyAI
阮一峰的网络日志
阮一峰的网络日志

Leo's Field

Don't nuke my docker network, nftables.service! - Leo's Field Sending Emails, with netcat - Leo's Field Use ZED with msmtp on Debian - Leo's Field Have fun with ZFS: Maintenance and Error Recovery - Leo's Field Have fun with ZFS: Tuning - Leo's Field Have fun with ZFS: Setting up storage pool - Leo's Field 2021 Recap: Seek - Leo's Field Deploying this site on CloudFlare Pages - Leo's Field Redesigning this blog - Leo's Field Homelab Project: 6 months in - Leo's Field Fix incompatible bytes library for actix-web and tokio - Leo's Field A Breif Look at Linux's Audio System - Leo's Field Record to MiniDisc with correct Track Marker on Linux - Leo's Field Build Fcitx5 IM module for proprietary software with its Qt library - Leo's Field Way to AOSC OS Maintainer: Advanced Techniques - Leo's Field Way to AOSC OS Maintainer: Basics - Leo's Field Have fun with ZFS: Introduction - Leo's Field Fix clipboard permission on Android 10 - Leo's Field MDR-7506 Detachable Cable Mod - Leo's Field Update firmware of a Crucial SSD with systemd-boot - Leo's Field Coreboot, me_cleaner, Tianocore, ThinkPad X220 - Leo's Field Dark mode! - Leo's Field Links - Leo's Field Some notes about the creation of this blog - Leo's Field Hello, world! - Leo's Field About - Leo's Field
Install Arch Linux, using a Sony Walkman - Leo's Field
Leo Shen · 2019-10-18 · via Leo's Field

More Posts 查看中文版本

"Because we can"

WTF why do you want to do this?

"Because we can"

Well, the actual reason I did this is because the operating system on my laptop just broke down and I don't have any USB drives lying around. But I have a Walkman, another computer that runs Linux, and a good Internet connection.

(Pretty rare scenario, I admit.)1

A little bit of background

To be specific, I'm using a ZX300a. If you really want to try this, just check you have a Walkman that supports USB Mass Storage mode. This mode basically turns the device into a USB flash drive.

Most Walkmans which runs the proprietary system (which is actually based on Linux2) use this mode, but some models that uses Android does not support it (such models use the crappy MTP protocol).

Thanks to the UEFI specification, on a USB drive, it is quite simple to make an OS to boot. Just copy everything to the FAT32-formatted partition on the USB drive and voilà! It's that simple.

However, since the Walkman is never meant to be used as a USB drive, there's some issues:

  • The drive letter is not ARCH_201910 (name may vary based on the specific archiso version you are using).
  • Walkman's OS "intelligently" shuts down the Mass Storage mode if it thinks it is disconnected from the computer.

    • Thus, you have to be fast on turning on the USB Mass Storage mode just after the computer is launched.
    • Also, after the Linux kernel is loaded and is initializing hardware, the mode is automatically disabled. A manual mount of the drive is needed.

Fortunately, these problems can be bypassed relatively easily.

How?

If you still think this is cool and want to try it out, here's how you do it.

Prepare the Walkman

First, grab a computer and download the latest archiso. For now the latest version is 2019-10, so I'll use this as an example.

Then, connect the Walkman to the computer and enable Mass Storage mode. Mount the internal partition to a mount point of your choice, and copy all files from the archiso to the Walkman partition.

Just in case you don't know how to mount a ISO image to a mount point, here's how you do it:

1
sudo mount -t iso9660 -o loop archlinux-2019.10.01-x86_64.iso /mnt/iso

Then, edit $WM_DIR/loader/entries/archiso-x86_64.conf. Change the options line to3 (find your own disk id by using ls -al /dev/disk/by-id)

1
options archisobasedir=arch archisodevice=/dev/disk/by-id/usb-SONY_WALKMAN_1234567890ABCD-0:0

Boot!

Now, umount all partition of the Walkman, disable Mass Storage mode, and plug it into the desired computer.

Start the desired computer, (quickly) enable the USB Mass Storage mode on Walkman and press F12 to choose boot device at the same time. Timing is essential here.

There should be two options appear at the Boot Menu. One is USB FDD: SONY WALKMAN and the other one is USB HDD: SONY WALKMAN. It seems that the FDD drive corresponds to the internal memory and the HDD drive corresponds to the SD card. So use the FDD one.

Two Walkman USB devices in the boot menu
Two Walkman USB devices in the boot menu

Then choose to boot from archiso. After the kernel is loaded, the Walkman disables the Mass Storage mode so the kernel cannot find the /run/archiso/bootmnt partition. Nasty little Walkman.

Confused Arch Linux and naughty Walkman
Confused Arch Linux and naughty Walkman

So we have to do it manually. After the Walkman finishes refreshing database, turn on Mass Storage once again. Then in the interactive fallback shell, type

1
2
mount /dev/disk/by-id/usb-SONY_WALKMAN_1234567890ABCD-0:0 /run/archiso/bootmnt
exit

Now archiso has everything it needs to boot and it should go through the boot process flawlessly and take you to the shell. Hooray!

Going through the normal boot process
Going through the normal boot process
We have access to the archiso environment!
We have access to the archiso environment!

Then what?

Then? You can just use your archiso as normal. Repair broken Linux, install Arch Linux, whatever you want. It's just archiso, after all.