https://github.com/kvaps/livenetsquash
dracut-live-netroot
https://github.com/kvaps/livenetsquash
Last synced: about 1 year ago
JSON representation
dracut-live-netroot
- Host: GitHub
- URL: https://github.com/kvaps/livenetsquash
- Owner: kvaps
- Created: 2017-10-11T06:53:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-08-18T11:21:47.000Z (almost 5 years ago)
- Last Synced: 2025-04-12T05:54:16.559Z (about 1 year ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 7
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Livenetsquash dracut module
This module allows to boot live linux system from squashed image that downloaded from http-server.
## Module installation
```
cd /tmp
curl -OL https://github.com/kvaps/livenetsquash/archive/master.tar.gz
tar xvf master.tar.gz
mv livenetsquash-master/dracut/* /usr/lib/dracut/modules.d/
rm -rf livenetsquash-master master.tar.gz
vim /etc/dracut.conf
```
add modules:
```
dracutmodules+="network base livenetsquash overlay-root"
```
generate initrd image:
```
dracut -f /boot/initramfs -v
```
## Squashed image
Build squashed image, example:
```
mksquashfs rootfs.squash -noappend
```
I advise you to use [darkhttpd](https://github.com/ryanmjacobs/darkhttpd) as simple http server for store your squased image.
## Bootloader configuration
Example `pxelinux.cfg/default`
```
default centos7
ontimeout centos7
label centos7
kernel vmlinuz
append initrd=initramfs selinux=0 root=live:http://boot-server/rootfs.squash rootovl=1 ro rd.live.image
```
Example `grub.cfg` (support efi and http-method)
```
set timeout=3
menuentry 'Linux diskless' --class os {
insmod efi_gop
insmod efi_uga
set net_default_server=${pxe_default_server}
echo "Loading Linux from http://${net_default_server}/vmlinz ..."
linux (http)/vmlinuz root=live:http://${pxe_default_server}/rootfs.squash rootovl=1 ro rd.live.image
echo "Loading initial ramdisk from http://${pxe_default_server}/initramfs ..."
initrd (http)/initramfs
}
```