How to create a bootable system with a squashfs root
My goal is to be able to take a customized root file system loaded with the software I want. So far I've created a squashed filesystem using debootstrap and chroot to install the software I want on the system.
The problem I am now running in to.. whenever I boot in to the system, my user accounts that were set up in the chroot do not work. First boot everything works out, second boot I can't log in. That is baffling to me.
Any one know a reason or a place to start looking?
boot grub2 live-usb squashfs kernel
add a comment |
My goal is to be able to take a customized root file system loaded with the software I want. So far I've created a squashed filesystem using debootstrap and chroot to install the software I want on the system.
The problem I am now running in to.. whenever I boot in to the system, my user accounts that were set up in the chroot do not work. First boot everything works out, second boot I can't log in. That is baffling to me.
Any one know a reason or a place to start looking?
boot grub2 live-usb squashfs kernel
You have to keep searching for the changes you wish to make. Look at the casper scripts and initrd as well as /usr/share and in the libs.
– Panther
Jan 14 '12 at 15:54
Well I got it working. I used the live-boot & live-boot-initramfs-tools to generate an initrd and extlinux for the bootloader. Works like a charm.
– cldfzn
Jan 15 '12 at 22:13
add a comment |
My goal is to be able to take a customized root file system loaded with the software I want. So far I've created a squashed filesystem using debootstrap and chroot to install the software I want on the system.
The problem I am now running in to.. whenever I boot in to the system, my user accounts that were set up in the chroot do not work. First boot everything works out, second boot I can't log in. That is baffling to me.
Any one know a reason or a place to start looking?
boot grub2 live-usb squashfs kernel
My goal is to be able to take a customized root file system loaded with the software I want. So far I've created a squashed filesystem using debootstrap and chroot to install the software I want on the system.
The problem I am now running in to.. whenever I boot in to the system, my user accounts that were set up in the chroot do not work. First boot everything works out, second boot I can't log in. That is baffling to me.
Any one know a reason or a place to start looking?
boot grub2 live-usb squashfs kernel
boot grub2 live-usb squashfs kernel
edited Jun 11 '13 at 15:13
cldfzn
asked Jan 14 '12 at 14:13
cldfzncldfzn
101126
101126
You have to keep searching for the changes you wish to make. Look at the casper scripts and initrd as well as /usr/share and in the libs.
– Panther
Jan 14 '12 at 15:54
Well I got it working. I used the live-boot & live-boot-initramfs-tools to generate an initrd and extlinux for the bootloader. Works like a charm.
– cldfzn
Jan 15 '12 at 22:13
add a comment |
You have to keep searching for the changes you wish to make. Look at the casper scripts and initrd as well as /usr/share and in the libs.
– Panther
Jan 14 '12 at 15:54
Well I got it working. I used the live-boot & live-boot-initramfs-tools to generate an initrd and extlinux for the bootloader. Works like a charm.
– cldfzn
Jan 15 '12 at 22:13
You have to keep searching for the changes you wish to make. Look at the casper scripts and initrd as well as /usr/share and in the libs.
– Panther
Jan 14 '12 at 15:54
You have to keep searching for the changes you wish to make. Look at the casper scripts and initrd as well as /usr/share and in the libs.
– Panther
Jan 14 '12 at 15:54
Well I got it working. I used the live-boot & live-boot-initramfs-tools to generate an initrd and extlinux for the bootloader. Works like a charm.
– cldfzn
Jan 15 '12 at 22:13
Well I got it working. I used the live-boot & live-boot-initramfs-tools to generate an initrd and extlinux for the bootloader. Works like a charm.
– cldfzn
Jan 15 '12 at 22:13
add a comment |
3 Answers
3
active
oldest
votes
To get a working system with a squashfs filesystem:
sudo apt-get install live-boot live-boot-initramfs-tools extlinux
sudo update-initramfs -u
Create a squashfs file from a bootstrapped or running ubuntu filesystem with whatever packages you want available. https://help.ubuntu.com/community/LiveCDCustomizationFromScratch provides good instructions for creating a debootstrapped system to build on. Format the target drive with ext2/3/4 and enable the bootable flag. Create the folder layout on the target drive and install extlinux:
mkdir -p ${TARGET}/boot/extlinux ${TARGET}/live
extlinux -i ${TARGET}/boot/extlinux
dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdX #X is the drive letter
cp /boot/vmlinuz-$(uname -r) ${TARGET}/boot/vmlinuz
cp /boot/initrd.img-$(uname -r) ${TARGET}/boot/initrd
cp filesystem.squashfs ${TARGET}/live
Create ${TARGET}/boot/extlinux/extlinux.conf with the following contents:
DEFAULT Live
LABEL Live
KERNEL /boot/vmlinuz
APPEND initrd=/boot/initrd boot=live toram=filesystem.squashfs
TIMEOUT 10
PROMPT 0
Now you should be able to boot from the target drive in to your squashed system.
add a comment |
This question was solved by the OP:
Well I got it working. I used the live-boot &
live-boot-initramfs-tools to generate an initrd and extlinux for the
bootloader. Works like a charm.
add a comment |
No longer works in 18.04.1:
user@myhost:~$ sudo apt-get install live-boot live-boot-initramfs-tools extlinux
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package live-boot
E: Unable to locate package live-boot-initramfs-tools
E: Unable to locate package extlinux
user@myhost:~$
Please advice
New contributor
1
If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review
– waltinator
7 hours ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f95392%2fhow-to-create-a-bootable-system-with-a-squashfs-root%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
To get a working system with a squashfs filesystem:
sudo apt-get install live-boot live-boot-initramfs-tools extlinux
sudo update-initramfs -u
Create a squashfs file from a bootstrapped or running ubuntu filesystem with whatever packages you want available. https://help.ubuntu.com/community/LiveCDCustomizationFromScratch provides good instructions for creating a debootstrapped system to build on. Format the target drive with ext2/3/4 and enable the bootable flag. Create the folder layout on the target drive and install extlinux:
mkdir -p ${TARGET}/boot/extlinux ${TARGET}/live
extlinux -i ${TARGET}/boot/extlinux
dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdX #X is the drive letter
cp /boot/vmlinuz-$(uname -r) ${TARGET}/boot/vmlinuz
cp /boot/initrd.img-$(uname -r) ${TARGET}/boot/initrd
cp filesystem.squashfs ${TARGET}/live
Create ${TARGET}/boot/extlinux/extlinux.conf with the following contents:
DEFAULT Live
LABEL Live
KERNEL /boot/vmlinuz
APPEND initrd=/boot/initrd boot=live toram=filesystem.squashfs
TIMEOUT 10
PROMPT 0
Now you should be able to boot from the target drive in to your squashed system.
add a comment |
To get a working system with a squashfs filesystem:
sudo apt-get install live-boot live-boot-initramfs-tools extlinux
sudo update-initramfs -u
Create a squashfs file from a bootstrapped or running ubuntu filesystem with whatever packages you want available. https://help.ubuntu.com/community/LiveCDCustomizationFromScratch provides good instructions for creating a debootstrapped system to build on. Format the target drive with ext2/3/4 and enable the bootable flag. Create the folder layout on the target drive and install extlinux:
mkdir -p ${TARGET}/boot/extlinux ${TARGET}/live
extlinux -i ${TARGET}/boot/extlinux
dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdX #X is the drive letter
cp /boot/vmlinuz-$(uname -r) ${TARGET}/boot/vmlinuz
cp /boot/initrd.img-$(uname -r) ${TARGET}/boot/initrd
cp filesystem.squashfs ${TARGET}/live
Create ${TARGET}/boot/extlinux/extlinux.conf with the following contents:
DEFAULT Live
LABEL Live
KERNEL /boot/vmlinuz
APPEND initrd=/boot/initrd boot=live toram=filesystem.squashfs
TIMEOUT 10
PROMPT 0
Now you should be able to boot from the target drive in to your squashed system.
add a comment |
To get a working system with a squashfs filesystem:
sudo apt-get install live-boot live-boot-initramfs-tools extlinux
sudo update-initramfs -u
Create a squashfs file from a bootstrapped or running ubuntu filesystem with whatever packages you want available. https://help.ubuntu.com/community/LiveCDCustomizationFromScratch provides good instructions for creating a debootstrapped system to build on. Format the target drive with ext2/3/4 and enable the bootable flag. Create the folder layout on the target drive and install extlinux:
mkdir -p ${TARGET}/boot/extlinux ${TARGET}/live
extlinux -i ${TARGET}/boot/extlinux
dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdX #X is the drive letter
cp /boot/vmlinuz-$(uname -r) ${TARGET}/boot/vmlinuz
cp /boot/initrd.img-$(uname -r) ${TARGET}/boot/initrd
cp filesystem.squashfs ${TARGET}/live
Create ${TARGET}/boot/extlinux/extlinux.conf with the following contents:
DEFAULT Live
LABEL Live
KERNEL /boot/vmlinuz
APPEND initrd=/boot/initrd boot=live toram=filesystem.squashfs
TIMEOUT 10
PROMPT 0
Now you should be able to boot from the target drive in to your squashed system.
To get a working system with a squashfs filesystem:
sudo apt-get install live-boot live-boot-initramfs-tools extlinux
sudo update-initramfs -u
Create a squashfs file from a bootstrapped or running ubuntu filesystem with whatever packages you want available. https://help.ubuntu.com/community/LiveCDCustomizationFromScratch provides good instructions for creating a debootstrapped system to build on. Format the target drive with ext2/3/4 and enable the bootable flag. Create the folder layout on the target drive and install extlinux:
mkdir -p ${TARGET}/boot/extlinux ${TARGET}/live
extlinux -i ${TARGET}/boot/extlinux
dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdX #X is the drive letter
cp /boot/vmlinuz-$(uname -r) ${TARGET}/boot/vmlinuz
cp /boot/initrd.img-$(uname -r) ${TARGET}/boot/initrd
cp filesystem.squashfs ${TARGET}/live
Create ${TARGET}/boot/extlinux/extlinux.conf with the following contents:
DEFAULT Live
LABEL Live
KERNEL /boot/vmlinuz
APPEND initrd=/boot/initrd boot=live toram=filesystem.squashfs
TIMEOUT 10
PROMPT 0
Now you should be able to boot from the target drive in to your squashed system.
answered Jun 11 '13 at 15:12
cldfzncldfzn
101126
101126
add a comment |
add a comment |
This question was solved by the OP:
Well I got it working. I used the live-boot &
live-boot-initramfs-tools to generate an initrd and extlinux for the
bootloader. Works like a charm.
add a comment |
This question was solved by the OP:
Well I got it working. I used the live-boot &
live-boot-initramfs-tools to generate an initrd and extlinux for the
bootloader. Works like a charm.
add a comment |
This question was solved by the OP:
Well I got it working. I used the live-boot &
live-boot-initramfs-tools to generate an initrd and extlinux for the
bootloader. Works like a charm.
This question was solved by the OP:
Well I got it working. I used the live-boot &
live-boot-initramfs-tools to generate an initrd and extlinux for the
bootloader. Works like a charm.
answered Apr 15 '12 at 21:26
community wiki
coversnail
add a comment |
add a comment |
No longer works in 18.04.1:
user@myhost:~$ sudo apt-get install live-boot live-boot-initramfs-tools extlinux
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package live-boot
E: Unable to locate package live-boot-initramfs-tools
E: Unable to locate package extlinux
user@myhost:~$
Please advice
New contributor
1
If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review
– waltinator
7 hours ago
add a comment |
No longer works in 18.04.1:
user@myhost:~$ sudo apt-get install live-boot live-boot-initramfs-tools extlinux
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package live-boot
E: Unable to locate package live-boot-initramfs-tools
E: Unable to locate package extlinux
user@myhost:~$
Please advice
New contributor
1
If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review
– waltinator
7 hours ago
add a comment |
No longer works in 18.04.1:
user@myhost:~$ sudo apt-get install live-boot live-boot-initramfs-tools extlinux
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package live-boot
E: Unable to locate package live-boot-initramfs-tools
E: Unable to locate package extlinux
user@myhost:~$
Please advice
New contributor
No longer works in 18.04.1:
user@myhost:~$ sudo apt-get install live-boot live-boot-initramfs-tools extlinux
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package live-boot
E: Unable to locate package live-boot-initramfs-tools
E: Unable to locate package extlinux
user@myhost:~$
Please advice
New contributor
New contributor
answered 9 hours ago
J DoeJ Doe
1
1
New contributor
New contributor
1
If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review
– waltinator
7 hours ago
add a comment |
1
If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review
– waltinator
7 hours ago
1
1
If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review
– waltinator
7 hours ago
If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review
– waltinator
7 hours ago
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f95392%2fhow-to-create-a-bootable-system-with-a-squashfs-root%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You have to keep searching for the changes you wish to make. Look at the casper scripts and initrd as well as /usr/share and in the libs.
– Panther
Jan 14 '12 at 15:54
Well I got it working. I used the live-boot & live-boot-initramfs-tools to generate an initrd and extlinux for the bootloader. Works like a charm.
– cldfzn
Jan 15 '12 at 22:13