Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Working with a persistent home on a NTFS partition

Hybrid View

  1. #1
    Junior Member registered user
    Join Date
    Sep 2005
    Posts
    11

    Working with a persistent home on a NTFS partition

    Hi everybody,
    since I thought this is very hot question, I was expecting there was exactly what I need on
    this forum, but google didn't help me too much. Sorry if you're tired reading about that.

    General problem:
    I'm trying to figure out how to explain to students how they can work with knoppix
    with a very wide range of possible hardware. Of course, a student might have a rather new
    PC with NTFS only on the HD, without a floppy drive, without any USB peripheral to save his files
    (I know this is very unsafe, but students do it).
    Therefore, in such an "extreme" case it's very important to be able to work with a persistent home
    on a NTFS partition.

    Good news:
    I did a few tries and I successfully created a persistent home. Let me recall the main steps I did with a
    Knoppix 4.0.2 (for the benefit of any interested reader):
    1) Put the CD in the driver during a Windows working session;
    copy the "MkImage-ct.exe" utility from the CD to the HD, then execute it.
    The dialog window is in german, but it is very simple to create a file KNOPPIX.IMG in the root
    directory of your NTFS partition.
    2) Reboot and start the Knoppix session, then you can run the creation of a persistent home
    by clicking on the Knoppix menu -> configure -> create persistent home.
    You must choice the same file you previously created in the Windows session, so that you
    don't modify the dimensions of any existing (or not) file. This procedure seems safe enough
    to Knoppix, which warns you are doing a delicate stuff, but it does the job.

    This procedure is a little different and simpler with respect that suggested at the web page
    http://www.knoppix.net/forum/viewtop...076&highlight=
    The procedure suggested there didn't work in my tries, but perhaps that was good for the
    Knoppix 3.8 only.


    Bad news:
    Every time I finished a working session in Knoppix (even without writing any file in the persistent
    home, but I guess the system does it) and I rebooted, I couldn't immediately reload my persistent
    home, because it appeared a message saying (at the end):
    "the NTFS filesystem needs to be brought into a consistent state first by using
    the Windows (TM) scandisk/chkdisk utility".
    Afterwards, the Knoppix session could continue without working on the persistent home.
    Thus, I've been forced to reboot again the PC, starting Windows, which did the check of the disk
    and automatically rebooted. Therefore, I could restart either a new Windows session or a Knoppix
    session with a persistent home where I've found my files.

    Problem:
    everything seems work correctly, BUT it seems that, after having worked with Knoppix with a
    persistent home, I'm everytime forced to restart a Windows session (I've tried it more than once).

    Question:
    do you know how to avoid passing through Windows?


    Many thanks for any help,
    ciao,
    Ugo


    P.S. Of course, I could suggest to the students to resize ntfs and create a new (vfat or something in
    linux) partition, where they can safely out the persistent home; but I guess they would be scared
    about resizing.....

  2. #2
    Senior Member registered user
    Join Date
    Feb 2005
    Location
    Saint Louis, MO, USA
    Posts
    376

    Re: Working with a persistent home on a NTFS partition

    I'd strongly recommend an external USB device. Many companies are giving away small USB sticks as swag. 16 MB is plenty for some simple file saving.

    Quote Originally Posted by ugo
    Question:
    do you know how to avoid passing through Windows?
    IIRC, you don't actually enter a full Windows session, but rather just it runs a chkdsk which then reboots.

    But to answer your questions, try ntfsfix. I've never used it but it sounds like it might do the trick. The way this might work is to boot using the "-b" cheatcode (e.g. boot: knoppix -b) which drops you into emergency mode. Once there, type "ntfsfix /dev/hda1" assuming /dev/hda1 holds the ntfs partition. When it's done, type exit to continue booting Knoppix.

    Give that a try and let us know how it goes.

    Quote Originally Posted by ugo
    P.S. Of course, I could suggest to the students to resize ntfs and create a new (vfat or something in
    linux) partition, where they can safely out the persistent home; but I guess they would be scared
    about resizing.....
    IMHO, resizing is the best option if you don't have an external USB device. After resizing you should create a new ext2 partition to hold a persistent disk image (PDI). I used this method quite a bit in the internet cafes and kiosks while travelling in Argentina. I'd copy both the ISO from the CD and the PDI from my USB key to the disk. I'd also create a swapfile on the partition and booted using the "bootfrom=" cheatcode. When I was done I'd boot again and copy the PDI to my USB key. On slow machines this worked much faster than using the CD.

    Good luck and let us know what works for you.

    Regards,
    - Robert
    http://www.cwelug.org

  3. #3
    Junior Member registered user
    Join Date
    Sep 2005
    Posts
    11
    Dear Robert,
    ntfsfix sounds good. I'll have a try next week (I have to go back in the PC classroom where I can text this situation, in all the
    other PC's where I can access when Windows is there, the filesystem is vfat just to safely write from Linux in a dual boot environment).
    Therefore, I'll let you know.

    I understand very well your point of view about resizing, but for the students any pretext is good in order to not learn a little
    about Linux and to continue badly working and programming under Windows....
    For this reason, I'm trying to select the solutions with the minimum impact on the hardware and with a very little effort
    for the students.
    A very bad life for teachers....

    Thanks a lot,
    Ciao,
    Ugo

  4. #4
    Senior Member registered user
    Join Date
    Aug 2003
    Posts
    126
    Hi Ugo,
    You might like to try out the following which I originally posted in http://www.knoppix.net/forum/viewtopic.php?t=21373. It should be available in Knoppix 4.02 I believe.

    The following SNAPSHOT informastion (see below) is taken from the /dvd/KNOPPIX/linux-ntfs directory of Knoppix 4 (Linux Magazine November 2005 cover edition) regarding the recently current state as far as writing to ntfs partitions. This uses libntfs. (The Open-Source linux-ntfs library not the kernel driver, which is derived from it). The kernel module is usually about 6 months behind libntfs. According to the article by Klaus Knopper you can now delete files and directories, and create up to 9 new files or subdirectories within a directory. It is complicated to recompile every program to use libntfs for write operations, so they use the FUSE kernel module and a utility called ntfs-mount to actually mount the NTFS partition.
    Hopefully the above background information will help when reading the SNAPSHOT information for developers below.
    Regards,
    Mark



    LINUX-NTFS DEVELOPMENT SNAPSHOT
    ===============================

    This version of KNOPPIX contains preliminary support for writing to
    NTFS filesystems using the "filesystem in userspace" module [1],
    plus a current (16-08-2005) snapshot of the linux-ntfs development
    [2].

    Both are preinstalled on this CD. Note that a "normal" mount of
    an ntfs partition (by clicking on a partition in KDE, for example)
    uses the safe version of the "read-only" linux-ntfs kernel module,
    which has very limited but safe overwrite-capabilities, and most
    certainly will NOT destroy your NTFS partitions accidentially.

    In order to test and use the extended write capabilities of the
    developer snapshot of linux-ntfs, you will have to follow the
    commandline instructions below.

    DISCLAIMER: THIS DEVELOPER'S SNAPSHOT VERSION OF LINUX-NTFS IS
    EXPERIMENTAL AND YET INCOMPLETE. IT IS STILl EXPERIMENTAL SOFTWARE.
    USE AT YOUR OWN RISK. MOST LIKELY, SOMETHING WILL BREAK IF YOU
    USE THIS SOFTWARE WITHOUT CAUTION. KNOPPER.NET CAN NOT BE HELD
    LIABLE UNDER ANY CIRCUMSTANCES FOR DAMAGE TO HARDWARE OR
    SOFTWARE, LOST DATA, OR OTHER DIRECT OR INDIRECT DAMAGE RESULTING
    FROM THE USE OF THIS SOFTWARE. IF THESE CONDITIONS ARE INACCEPTABLE
    TO YOU, DON'T USE THIS SOFTWARE.

    After that being said, here are the instructions. It is assumed that
    you do this as "knoppix" user from the live filesystem. Make sure you
    have a backup of all important data on your computer before.

    # Step 1: Load the "Filesystem in Userspace" module.
    sudo modprobe fuse

    # Step 2: Make NTFS partition (example: /dev/hdd1) accessible for
    # unprivileged users.
    sudo chmod 666 /dev/hdd1

    # Step 3: Create a mountpoint in your user home directory.
    mkdir $HOME/ntfs

    # Step 4: Mount the partition read/write
    ntfsmount $HOME/ntfs -o dev=/dev/hdd1

    You should now be able to access the content of the NTFS partition
    at $HOME/ntfs. Don't forget to

    # Step 5:
    fusermount -u $HOME/ntfs

    after you are done experimenting.

    Please address technical contributions (debugging output, patches,
    corrections) to the NTFS development team [2], but it does not make
    much sense at this point to ask usability questions like "when
    will official NTFS write support be in the kernel?" or "why is
    NTFS so difficult", at this early stage.

    Resources:
    [1] http://fuse.sourceforge.net/ Filesystem in Userspace
    [2] http://linux-ntfs.sourceforge.net/ Linux-NTFS Project
    Regards,
    Mark

  5. #5
    Junior Member registered user
    Join Date
    Sep 2005
    Posts
    11
    Dear Robert,
    apparently, starting the boot process with
    knoppix -b
    doesn't work. In fact, after a little while the boot process stops by requiring the root password for maintenance (or, alternatively,
    it suggests to type Ctrl-D to restart the normal bootup process).
    The problem is that AT THIS POINT IT DOES NOTHING! I mean, the PC didn't answer to anything I tried to type from the keyboard.
    Thus, I manually rebooted....

    Have you further suggestions?
    Let me repeat that ntfsfix sounded good. It's a pity I couldn't start it!

    Thanks,
    ciao,
    Ugo

  6. #6
    Senior Member registered user
    Join Date
    Feb 2005
    Location
    Saint Louis, MO, USA
    Posts
    376
    Quote Originally Posted by ugo
    The problem is that AT THIS POINT IT DOES NOTHING! I mean, the PC didn't answer to anything I tried to type from the keyboard.
    You should be able to press the Enter key to start a bash shell in emergency mode.

    What kind of keyboard do you have? PS/2, USB, something else?

    Regards,
    - Robert
    http://www.cwelug.org

  7. #7
    Junior Member registered user
    Join Date
    Sep 2005
    Posts
    11
    Hi Robert,
    I tried with the Enter key too.

    The keyboard is connected of USB type.

    Cheers,
    Ugo

  8. #8
    Senior Member registered user
    Join Date
    Feb 2005
    Location
    Saint Louis, MO, USA
    Posts
    376
    Quote Originally Posted by ugo
    The keyboard is connected of USB type.
    Ahh. Unfortunatley, booting into emergency mode won't work with a USB keyboard, only with PS/2. That's because the USB drivers are not built into the kernel nor are any drivers loaded when entering emergency mode.

    But the short term goal is to figure out if ntfsfix will work. For that, simply boot from the CD into single-user mode and don't use the persistent disk image (PDI):
    Code:
    boot: knoppix noswap 1
    Then run ntfsfix. If it looks like ntfsfix worked, reboot as you normally would and use the PDI. If using the PDI works, then we can tackle a long-term solution.

    Good luck and let us know how it goes.

    Regards,
    - Robert
    http://www.cwelug.org

  9. #9
    Junior Member registered user
    Join Date
    Sep 2005
    Posts
    11
    Dear Robert,
    I'm very sorry for having been silent so long. I know it's not serious, but I had very good reasons: my wife delivered our second child a week ago, so it's a long time I'm not going in the PC classroom where I did the previous tries.

    However, I created a NTFS partition on my laptop (so, no problem for the USB keyboard) and I made a test which provided interesting (but undesired) results.

    I made a persistent home, rebooted, and I wrote something on the persistent
    home. Then, I rebooted as you suggested by using the cheatcode
    knoppix noswap 1
    and I've ran ntfsfix on the NTFS partition.
    Then, I rebooted once again by scanning for the persistent home.

    No chance! Knoppix still complains and requires to run the windows utility
    to check and fix the NTFS partition.....

    I've retried in order to be sure I was not wrong: same result!


    The problem seems without a straight solution: isn'it?

    I will try also by using FUSE, Mark's suggestion looks very interesting, but may be too difficult for students.


    Thanks a lot.
    Ciao,
    Ugo

  10. #10
    Junior Member
    Join Date
    Jan 2006
    Posts
    1
    Hello ugo (congratulation to paternity*g)

    i run exactly in the same problem (working with students too*g).
    i tried hard to find a solution, but i had only luck with two workarounds:

    1. the fuse-ntfs-thing did work-but, as u said, it takes much effort to test and document.
    2. the unionfs-automated-thing does work for me IF i choose the options while starting knoppix like this:
    [X] home
    [ ] system
    [ ] overwrite
    [ ] init
    ...so the homedir is persitent, but /etc and global systemconfig isn't.

    i think the problem with choosing [x]system is, that the KNOPPIX.IMG-file or the whole ntfs-partition doesn't unmount correct while shutting down knoppix. At least i wasn't able to umount KNOPPIX.IMG or the ntfs-partition by hand (always busy-errors).
    i would be glad if we could find a better solution (saving systemconfig included) together.

    Ciao,
    Rammel

Page 1 of 2 12 LastLast

Similar Threads

  1. NTFS Persistent Home?
    By Laos in forum General Support
    Replies: 11
    Last Post: 06-13-2007, 08:37 PM
  2. Persistent home and NTFS
    By mattperkins26 in forum MS Windows & New to Linux
    Replies: 2
    Last Post: 02-10-2005, 01:05 PM
  3. Persistent /home not working
    By dargaud in forum General Support
    Replies: 1
    Last Post: 09-12-2004, 07:21 PM
  4. persistent home on captive ntfs
    By knopstar in forum Customising & Remastering
    Replies: 2
    Last Post: 08-20-2004, 03:54 AM
  5. Persistent home possible with captive NTFS?
    By arkaine23 in forum Customising & Remastering
    Replies: 0
    Last Post: 02-17-2004, 12:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Intel Core i7-9700 Octa-Core 3 GHz Desktop Processor LGA 1151 picture

Intel Core i7-9700 Octa-Core 3 GHz Desktop Processor LGA 1151

$79.99



Intel Core i5-14500 SRN3T 2.6GHz 14-Core 24 MB Cache Desktop CPU Processor picture

Intel Core i5-14500 SRN3T 2.6GHz 14-Core 24 MB Cache Desktop CPU Processor

$180.00



INTEL CORE I7-870 SLBJG 2.93GHZ LGA1156 4 CORE CPU PROCESSOR picture

INTEL CORE I7-870 SLBJG 2.93GHZ LGA1156 4 CORE CPU PROCESSOR

$23.00



AMD Ryzen 5 9600X Processor (Zen 5) 6-Core 3.9GHz AM5 65W CPU 100-000001405 USED picture

AMD Ryzen 5 9600X Processor (Zen 5) 6-Core 3.9GHz AM5 65W CPU 100-000001405 USED

$165.99



AMD Ryzen 5 5600X Desktop Processor (3.7GHz, 6 Cores, AM4 CPU) 100-100000065 picture

AMD Ryzen 5 5600X Desktop Processor (3.7GHz, 6 Cores, AM4 CPU) 100-100000065

$135.00



Intel Core i9-9900 3.10GHz CPU Processor SRG18 picture

Intel Core i9-9900 3.10GHz CPU Processor SRG18

$165.00



Intel Core i7-9700 3.00 GHz LGA 1151 Desktop CPU Processor SRG13 picture

Intel Core i7-9700 3.00 GHz LGA 1151 Desktop CPU Processor SRG13

$79.99



Intel Core i5-7500 Processor (3.4 GHz, 4 Cores, LGA 1151) - SR335 picture

Intel Core i5-7500 Processor (3.4 GHz, 4 Cores, LGA 1151) - SR335

$12.99



Lot of 2 INTEL CORE ULTRA 5 245 PROCESSOR | 3.50 GHZ | SRVFE picture

Lot of 2 INTEL CORE ULTRA 5 245 PROCESSOR | 3.50 GHZ | SRVFE

$256.99



AMD Ryzen 7 7800X3D 8-Core 16-Thread 4.2GHz/5.0GHz Socket AM5 picture

AMD Ryzen 7 7800X3D 8-Core 16-Thread 4.2GHz/5.0GHz Socket AM5

$275.00