如何将 skype 添加到 live usb(在创建 usb 之前)?

如何将 skype 添加到 live usb(在创建 usb 之前)?

我刚刚使用 Unetbootin 和 Ubuntu 11.10 的 ISO 创建了实时 ubuntu usb。

一切正常,但我怀念 skype。我能以某种方式将 skype 添加到 ISO 中吗?从 usb 启动后不下载并安装在 usb 上?我希望 iso 为下一个 usb 做好准备。

答案1

实际上,我没有抓住你的问题的重点。你从一开始就希望将 Skype 安装在 USB 上。我的另一个答案涉及在将 Ubuntu 安装到硬盘驱动器后安装 Skype。

实际上,要完成您所要求的操作,唯一的方法是重新制作 filesystem.squashfs 或将其安装到 casper-rw 中。但是,这两种方法都需要在 Linux 系统中(即使是 LiveCD,但需要几 GB 的 RAM 才能运行)。您可能能够在 Cygwin 中执行此操作,但这需要了解如何获取和安装 Ubuntu 源代码。

创建 casper-rw 与在启动具有持久性的 Live USB 后安装它相同,但这不是您想要的。

如果您希望将其安装在主文件系统中,您需要执行以下操作:

sudo unsquashfs /cdrom/casper/filesystem.squashfs
sudo mount --bind /dev squashfs-root
sudo mount -t proc none squashfs-root/proc
sudo mount -t sysfs none squashfs-root/sys
sudo mount -t devpts none squashfs-root/dev/pts
sudo cp /etc/resolv.conf squashfs-root/etc
sudo chroot squashfs-root
# export HOME=/root
# export LC_ALL=C
# dbus-uuidgen > /var/lib/dbus/machine-id
# dkpg-divert --local --rename --add /sbin/initctl
# ln -s /bin/true /sbin/initctl
# wget http://download.skype.com/linux/skype-ubuntu_2.2.0.35-1_i386.deb
# dpkg -i skype-ubuntu_2.2.0.35-1_i386.deb
# rm skype-ubuntu_2.2.0.35-1_i386.deb
or
# wget http://download.skype.com/linux/skype-ubuntu_2.2.0.35-1_amd64.deb
# dpkg -i skype-ubuntu_2.2.0.35-1_amd64.deb
# rm skype-ubuntu_2.2.0.35-1_i386.deb
# rm /etc/resolv.conf
# rm /var/lib/dbus/machine-id
# rm /sbin/initctl
# dpkg-divert --rename --remove /sbin/initctl
# exit
sudo umount squashfs-root/dev/pts
sudo umount squashfs-root/dev
sudo umount squashfs-root/proc
sudo umount squashfs-root/sys
sudo mksquashfs squashfs-root /cdrom/caser/filesystem.squashfs

以上所有内容都是在您从 LiveUSB 运行的情况下进行的,与 Cygwin 的唯一区别是 USB 的路径(在 LiveUSB 中称为 /cdrom)。此外,您必须从 cygwin 内部编译 squashfs-tools。源代码可以从 packages.ubuntu.com/oneiric/squashfs-tools 下载。

总而言之,正如您所看到的,运行 LiveUSB 后安装起来要容易得多(如果您使用持久文件停滞不前,则只需安装一次即可)。如果您需要有关如何制作持久文件的帮助,我也可以向您展示。

答案2

这尚未经过测试,但可以为您指明正确的方向。您可能想要做的是使用预置文件在安装后运行命令来添加 Skype 包。

因此,您需要将 Skype 包添加到磁盘上,然后将 /preseed/ubuntu.seed 文件更改为如下所示的内容:

# Enable extras.ubuntu.com.
d-i    apt-setup/extras    boolean true
# Install the Ubuntu desktop.
tasksel    tasksel/first    multiselect ubuntu-desktop
# INSTALL SKYPE
d-i    preseed/late_command    cp /cdrom/skype-i386.deb /target
d-i    preseed/late_command    chroot /target dpkg -i /skype-i386.deb
d-i    preseed/late_command    rm /target/skype-i386.deb
# On live DVDs, don't spend huge amounts of time removing substantial
# application packages pulled in by language packs. Given that we clearly
# have the space to include them on the DVD, they're useful and we might as
# well keep them installed.
ubiquity    ubiquity/keep-installed string icedtea6-plugin openoffice.org

我相信这样就行了。安装后,它会通过在安装后但重新启动之前运行一些手动命令来专门将 Skype 安装到系统中。

答案3

目前,Cubic 用于创建可启动 ISO,可以将 Skype 添加到此映像中。请注意,Microsoft 规定 Skype 仅适用于 64 位系统。

按照此处的说明安装 Cubic 并准备 .iso 映像以供定制:https://www.ostechnix.com/create-custom-ubuntu-live-cd-image/

继续进行,直到“一旦文件系统提取出来,您将自动进入 chroot 环境。”

现在从这里将 Skype skypeforlinux-64.deb 文件下载到您的正常环境中:https://www.skype.com/en/get-skype/

将文件拖到 Cubic 说明中显示的“chroot 环境”窗口(带有 # 提示符),按复制,这会将 Skype .deb 文件复制到映像创建区域。在此窗口中,您不需要使用“sudo”命令。

然后使用以下命令安装:

# dpkg -i skypeforlinux-64.deb

然后更新它(必须使其工作!)

# apt-get install --only-upgrade skypeforlinux

你可以使用以下命令检查是否已安装

# apt list --installed

要使 Skype 显示在正在运行的 Live CD 的桌面上,请使用现有的 skypeforlinux.desktop 文件(或创建您自己的文件)并将其放在 chroot /usr/share/applications 中。然后设置其权限“a+x”。

现在完成生成图像,根据需要刻录到 DVD,或传输到 USB。

相关内容