Milos Nikic <nikic.mi...@gmail.com> writes:

> Hey.
>
> I added a revised journal_hint2.sh script that is not that opinionated. It's 
> very rough now (i had a really long day). 
> I also added a small c program hjhint.c that should basically do everything 
> (shrinking, resizing, turning on and off).
> The only caveat is it won't work on Hurd (i only tested it on a linux host).
>
> I didn't do another release (i wish a day is longer):
> Here is the script (now revised), please try it, I hope it will work.
>
> https://github.com/mnikic/hurd-journaling/blob/journal-main/contrib/journaling/journal-hint2.sh
>
> I should also try and get a Hurd on real hardware. That is the real test for 
> file systems.

It's pretty cheap to get the Hurd running on real hardware.  My Thinkpad
T43 was maybe $30.  The T400 supports SSDs and a max RAM of8 GiB.  That
should cost you maybe $200 - $300.

> Cannot wait to hear how it works out.
> Thank you very much for trying it out!
>
> On Thu, Aug 14, 2025 at 9:23 AM <jbra...@dismail.de> wrote:
>
>  August 14, 2025 at 11:32 AM, "Milos Nikic" <nikic.mi...@gmail.com
>  
> mailto:nikic.mi...@gmail.com?to=%22Milos%20Nikic%22%20%3Cnikic.milos%40gmail.com%3E
>  > wrote:
>
>  > 
>  > Hey Joshua,
>  > 
>  > No you didn't do anything wrong.
>  > 
>  > The tooling is not there yet. It is actually looking to do it on partition 
> 2 because that is where ext2 is on the official
>  Hurd image.
>  > The tooling ain't  ready for the real partition.I apologize for 
> recommending it to you!
>  > 
>  > It's the morning here where I am and I'm at my work, but by  evening I 
> hope to have better tooling to make this
>  easy.
>  > 
>  > Thanks for trying once again,
>  > And thanks for your patience!
>  > 
>  > Milos
>
>  No worries.  I still need to compile your libdiskfs anyway.  I'll try to get 
> that working.
>
>  > 
>  > On Thu, Aug 14, 2025, 6:19 AM Joshua Branson <jbra...@dismail.de 
> mailto:jbra...@dismail.de > wrote:
>  > 
>  > > 
>  > > Milos Nikic <nikic.mi...@gmail.com mailto:nikic.mi...@gmail.com > writes:
>  > > 
>  > > > Hi Diego and Joshua
>  > > >
>  > > > @Joshua
>  > > > Thanks! Great to hear you shrank /home successfully.
>  > > > I got to say I never even tried on real hardware so thanks for trying! 
> I also never tried it on a separate mount :).
>  Im curious
>  > > > of the results you will have.
>  > > >
>  > > > The script should still work whether its the image or real hardware:
>  > > > On real hardware one can use something like:
>  > > > sudo ./contrib/journaling/journal-hint2.sh /dev/sdXY on
>  > > >
>  > > > A couple safety notes for running the hint script on real hardware:
>  > > > - Please run it on the partition device (e.g., /dev/sdXY), not on the 
> whole disk.
>  > > > - Do not write the hint while the filesystem is mounted read-write. 
> ext2 caches the superblock; writing it raw
>  while mounted
>  > > > can be lost or cause inconsistency. 
>  > > >
>  > > > For /home (assuming it’s a separate ext2 partition): 
>  > > > 0) make a backup if you can  
>  > > > 1) unmount /home (close apps first) 
>  > > > sudo umount /home 
>  > > 
>  > > This worked just fine.  `mount` showed that only / was mounted.
>  > > 
>  > > > 2) ensure clean state  
>  > > > sudo e2fsck -f /dev/sdXY 
>  > > 
>  > > This also worked just fine.
>  > > 
>  > > > 3) write the journaling hint (device instead of .img) 
>  > > > sudo ./contrib/journaling/journal-hint2.sh /dev/sdXY on 
>  > > 
>  > > cat /etc/fstab
>  > > # /etc/fstab: static file system information.
>  > > #
>  > > # <file system> <mount point>   <type>  <options>       <dump>  <pass>
>  > > /dev/hd0s1      /               ext2    defaults        0       1
>  > > /dev/hd0s6      /home           ext2    defaults        0       2
>  > > /dev/hd0s5      none            swap    sw              0       0
>  > > # /dev/hd2        /media/cdrom0   iso9660 noauto          0       0
>  > > # /dev/fd0        /media/floppy0  auto    rw,noauto       0       0
>  > > 
>  > > # ./contrib/journaling/journal-hint2.sh /dev/sd0s6 on
>  > > 
>  > > This is where I got stuck.  When I ran the above command, I got this
>  > > error message:
>  > > 
>  > > [ERROR] could not find partition 2 in fdisk output
>  > > 
>  > > What did I do wrong?
>  > > 
>  > > -- 
>  > > 
>  > > Joshua Branson
>  > > Sent from the Hurd
>  > >
>  >
>

-- 

Joshua Branson
Sent from the Hurd

Reply via email to