-
[Persistent home] How to increase [SOLVED]
I have been working with home=scan and myconfig=scan
So far so good to get my home and config back after rebooting.
But I made a quite long session and now I have no room in home anymore in such a way that I can't even start Knoppix/KDE.
Is there a way to come out of this situation and not losing the data in knoppix.img?
If I boot without home=scan and create another bigger persistent home, can I sort of mount the old knoppix.img and recover the data in there?
BTW I did a search and I apparently didn't find this situation back in earlier posts.
-
Senior Member
registered user
Hi,
The persistent home image is stored as a regular img file and so can be mounted as a loop device.
The steps below is an example of a persistent home image stored as /media/hdb1/knoppix.img. I am also assuming what you want to copy are data files from the old persistent home image.
1. Start Knoppix but do not load the persistent home image. So, don't enter home=scan, and if prompted by Knoppix to load an image, just say cancel.
2. Mount the partition where the image is stored: in this case /media/hdb1. Make it writable.
3. Rename /media/hdb1/knoppix.img to some other name like test.img.
4. Open a shell and enter the following codes:
Code:
mkdir /media/image
mount /media/hdb1/test.img /media/image -o loop=/dev/loop3
5. The contents of your old persistant image are now viewable under the folder /media/image. For example the stuff on the old desktop is found at /media/image/home/knoppix/Desktop.
6. Create a new persistent home image of larger size.
7. Copy over whatever you want from /media/image to the home folder or desktop or wherever you want. These will now be part of the new persistant home image.
8. Umount /media/image.
It worked for me, so I hope it works for you. Regards.
-
Thank you for the procedure.
I tried to mount the persistent image but not as a loop device.
When done I'll let know if the procedure worked.
-
I followed the precedure Jacky described and can understand and execute up to point 6
The content of the old knoppix.img is indeed viewable and seems to start from '/'
When trying to copy I get errors of files being there already.
Also I wonder, when I copy files to f.e. desktop, how does the old knoppix.img, which seem to start from '/', incorporate with the existing file system and to bring that info to the new knoppix.img..
My old knoppix was 124MB with some 10KB free.
I rebooted and looked at the size of the new knoppix.img.
It is indeed 186MB (altho I added 64MB) instead of 124MB and 69MB is used now in stead of 124MB while in the ols knoppix situation.
Where is the rest gone too?
What was in the old knoppix.img, what I don't have in the new knoppix.img anymore?
I feel, there is a lack of a simple procedure to increase (or decrease) the size of the knoppix.img file without loosing data.
If I remember well, the advice I saw here, was to work preferably in the LiveCD mode.
Any other advice is welcome.
(BTW: I use also PuppyLinux. There is also the possibility to save the home data, called pup_save.3fs. There is a simple procedure to increase or decrease this pup_save.3fs file to any extend in parts of 32MB. I use a pup_save.3fs of 1.4GB for the moment)
-
Senior Member
registered user
How did you copy the files? Did you use "cp -a" command to include hidden files and to preserve file attributes?
Code:
cp -a /path_to_source_directory/* /path_to_destination_directory/
-
No I tried in Konqueror with drag and drop.
Expecting problems of ownership, I called the super mode Konqueror
So with cp (the way you stated) , I can copy the contents of my old knoppix.img to '/' while I have booted.
I suppose there are files with the same name and the question will probably made 'do you want to overide' (as I had in SU Konqueror)
I said overide, and I had an unstable system.
Not that dramatic as a reboot brought me back a stable system.
I'll try it and as I am still intesting mode (LiveCD), no real harm can be done.
-
So I went to Konsole in SU mode.
Mounted the old knoppix.img at /media/knoppix_old and performed the command.
This is what comes on the Konsole.
Code:
root@3[knoppix]# cp -a /media/knoppix_old/* /
cp: cannot overwrite non-directory `/etc' with directory `/media/knoppix_old/etc'
cp: cannot overwrite non-directory `/home' with directory `/media/knoppix_old/home'
cp: cannot overwrite non-directory `/lib' with directory `/media/knoppix_old/lib'
cp: cannot overwrite non-directory `/lost+found' with directory `/media/knoppix_old/lost+found'
cp: cannot overwrite non-directory `/root' with directory `/media/knoppix_old/root'
cp: cannot overwrite non-directory `/tmp' with directory `/media/knoppix_old/tmp'
cp: cannot overwrite non-directory `/usr' with directory `/media/knoppix_old/usr'
cp: cannot overwrite non-directory `/var' with directory `/media/knoppix_old/var'
root@3[knoppix]#
I expected some trouble like this.
Apparently I didn't catch the procedure yet to get my old knnoppix.img into the system after having created a new and bigger one.
-
BTW, this are the mounted file systems.
Code:
root@3[knoppix]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 2.5M 27K 2.4M 2% /
/ramdisk 193M 3.6M 189M 2% /ramdisk
/UNIONFS 2.1G 2.0G 115M 95% /UNIONFS
/dev/hdd 697M 697M 0 100% /cdrom
/dev/cloop 1.9G 1.9G 0 100% /KNOPPIX
/dev/hda6 3.5G 3.1G 419M 89% /media/hda6
/media/hda6/knoppix.img
186M 72M 115M 39% /KNOPPIX.IMG
/media/hda6/knoppix_0.img
124M 124M 1.0K 100% /media/knoppix_old
root@3[knoppix]#
The old knoppix.img was 124 MB, the new one 186 MB (I increased with 64 MB) but it only contains 72 MB.
I use also myconfig=scan.
-
Senior Member
registered user
root@3[knoppix]# cp -a /media/knoppix_old/* /
You specified "/" (root directory) as destination directory; no wonder you got these error messages. Instead, take the mount point of your new home image file such as "/media/mount_point/".
-
Ockham23, Thank you I got the picture now.
Only I wasn't pepared what to reply if I should overwrite or not.
I first tried to overwrit all files.
Well, I ended up with a faulty system; a lot of things not working anymore.
I started the whole sequence again and this time I didn't overwirte.
The new persistent home is now 125 MB, while the old one was 124 MB, so I presume all old data is added to the new one.
In any case, I did a suggestion at the proper place, to have a one click procedure, with just one question: how much to increase/decrease.
That would be much easier.
Similar Threads
-
By carolus in forum General Support
Replies: 0
Last Post: 04-29-2008, 10:28 PM
-
By nnigam in forum General Support
Replies: 0
Last Post: 07-17-2007, 03:15 PM
-
By hotplainrice in forum General Support
Replies: 11
Last Post: 10-27-2006, 09:35 AM
-
By django in forum General Support
Replies: 6
Last Post: 06-19-2006, 11:03 PM
-
By beausimon in forum General Support
Replies: 6
Last Post: 04-23-2006, 03:40 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Lenovo ThinkBook 15 Gen 4 Notebook 15.6" FHD AMD R7 5825U 16GB RAM 512GB SSD
$39.33
Lenovo Legion Pro 7i 16" WQXGA 240Hz Gaming Laptop i9-14900HX 16GB RAM RTX 4080
$37.98
15.6" Lenovo ThinkPad Laptop PC: Intel i5 16GB RAM 512 SSD Windows 10 Webcam
$229.99
Lenovo Ideapad 1i 15.6" FHD Touchscreen Laptop - Intel Core i3-1215U with 8GB...
$329.99
Lenovo ThinkBook 15 Gen 4 Notebook 15.6" FHD AMD R7 5825U 16GB RAM 512GB SSD
$479.99
Lenovo LOQ 15.6" FHD 144Hz Gaming Laptop i5-12450HX 12GB RAM 512GB SSD RTX 3050
$599.99
Lenovo ThinkBook 15 Gen 4 Notebook 15.6" FHD Intel Core i7-1255U 8GB RAM
$514.99
Lenovo ThinkPad T480 Laptop Intel Core i5-8350U 16GB Ram 256GB SSD 14" FHD W11P
$204.99
Lenovo ThinkPad E, AMD, 8GB RAM, 256GB SSD, No OS, 20T80005US
$280.00
Lenovo ThinkPad L14 14” FHD Laptop AMD Ryzen 5 PRO 16GB RAM 512GB SSD Windows 10
$229.99