Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 days ago.
Improve this question
How do I write to/make changes to an existing squashfs filesystem?
I have tried using aufs/unionfs, but these require kernel modules that are extremely hard to compile.
Do not use aufs/unionfs. On a Fedora system for example, install squashfs-tools by doing
#yum install squashfs-tools
This will get you /sbin/mksquashfs and /usr/sbin/unsquashfs installed on your host machine.
Use these to uncompress an existing squashfs, make changes, and then compress it back again. Like so....
#ls rfs.squashfs
#unsquashfs rfs.squashfs
#ls rfs.squashfs squashfs
Now make changes
#cd squashfs
#mkdir etc/vector
And compress it back
#mksquashfs squashfs my-new-squashfs
Using (mk|un)squashfs you may loose original permissions, compression type and so on.
So, use unsquashfs -s to determine useful options.
Also, you may mount -o loop -t squashfs to review fs
PS: sorry, can't comment
Related
Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 days ago.
Improve this question
https://wiki.archlinux.org/title/dm-crypt/Encrypting_an_entire_system
So I installed arch detailed at the third entry in that link (LVM on LUKS). To install the os this way, you have to pass parameters identifying the LVM group and the root partition to grub. So how would I install a second encrypted os since Im assuming I can only tell grub to identify one root partition. I was wondering if I could chain load from the first grub to the second grub, so I started looking into that and realised I'm not even sure what happens when you install grub and what it does to the unencrypted boot partition and the encrypted partitions. How would I go about installing grub a second time without ruining the first installation?
I tried to find a solution online but there weren't any concrete answers on how to achieve this. I really don't want to mess up my primary OS trying something that mightn't work and leave me with a broken system.
Also, as a side note and small quick question.. if I add another key to a luks encrypted partition, can I then use the old key and any new keys interchangeably?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
Today,I encounter a very tough problem which cost me nearly 6 hours.
When I remove a file called ha_wan.conf using rm -rf ha_wan.conf command under /etc directory,Success.When I use ls -al command to see the result,The file disappear.
But when I reboot the linux system,same file named ha_wan.conf come back,located under /etc/ directory.
I tried to delete it many many times,It is the same result.
What should I do,I want to permanently remove that file.Thanks.
There's no magic. You removed the file. If you still see it after a reboot, it means one of two things:
(very likely) Some service recreates the files on boot, or periodically. You can probably use standard system tools to find out which package contained that file. (for example dpkg -S ha_wan.conf in debian-like systems)
(unlikely) You're running some interesting system which uses a temporary filesystem in /etc. If you're using a standard desktop distribution, that's improbable. But if it's some kind of router / special device, then it could happen.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
This is more of a curiosity question, but I feel it's worth asking.
Frequently when downloading software on Linux, I'm used to using sudo apt-get install [package] or whatever package manager is available, but for some projects like sbt, they don't have a repository (so I can't just type sudo apt-get install sbt and use it out of the box). I have to download the binaries and add them to PATH.
What I like to do is create a directory specific to programs like sbt, specifically ~/Programs. I move the unpacked directory into it, and add it to PATH. However, I'm always a little wary about moving the binary out of the directory it came in, so I don't want to remove it.
Is there such a thing as a recursive PATH variable, so that not only ~/Programs is added but also ~/Programs/sbt, ~/Programs/other_program, etc.? And if not, is it a good idea to make it recursive? I've tinkered with the Linux kernel before as part of a university class, I wonder if it's worth experimenting with.
Add something like this to ~/.bashrc or ~/.bash_profile:
for each in ~/Programs/*
do
PATH+=:"$each"
done
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I have run bitbake core-image-minimal-dev properly configured for a genericx86 machine. BitBake generates a bootia32.efi, a bzImage--<stuff>.bin, an .hddimg, an .iso, a .rootfs.ext3, a .rootfs.ext4, a .rootfs.tar.bz2, and a core-image-initramfs-<stuff>.rootfs.cpio.gz. I'm interested in a method of how to dd one or more of these onto the hard disk of my target machine and boot from that hard disk.
dd if=path/to/imagefile/imagename.hddimg of=/dev/usbdevicename
You'll find the correct usb device name e.g. by plugging in the usb disk and looking at dmesg|tail output -- do not guess as mistakes will be fatal to your hard disk. A practical example from my build machine:
sudo dd if=tmp/deploy/images/intel-corei7-64/core-image-sato-intel-corei7-64.hddimg \
of=/dev/sdb \
bs=4096
Note that you probably want to use intel-corei7-64 as the machine unless you know that genericx86 is correct for your hardware: despite the name former is the common Intel BSP for anything that's not ancient (that includes big Cores, Xeons, Atoms ...).
How to boot the image depends on your target device: you may need to go to BIOS settings to select "boot from USB".
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I'm running CentOS 6.4 in a VMWare Player virtual machine. I was trying to add two partitions to the file system. First I used fdisk to add the partitions, then mke2fs, then I mounted the partitions. Then I manually edited /etc/fstab, I added lines for the new partitions listed by blkid.
When I restarted, the OS is failing to start, it brings me to a terminal. So I tried to undo the changes I made to the /etc/fstab file, but it's saying that everything is read only, even though I am root. It won't let me remove the lines I added before to /etc/fstab.
Does anybody know how I can recover? At least how to get the stupid thing to boot again.
I think you need to remount the filesystem in rw mode:
mount -o rw,remount /
After that you can edit /etc/fstab and revert your changes, save the file and reboot.