Ask your questions here.
Post a reply
dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: Load to RAM option at Boot

Tue Jan 31, 2017 3:01 pm

I looked at the live-boot diffs, the rw patch needs a minor update (9990-misc-helpers). We were always recommended to use the newest version on stable.
The problem with hooks and toram is not actually a technical one but finding a sane way to do it. There isn't a "standard" place to put hookscripts (and any dependent files like a config to copy or a deb to install automatically). In a multiboot setup some might be different between systems, others common to more than one.. I generally use a subdir of the live-media directory for the relevant system. Each use case is different, this function is dedicated for custom stuff.
Hooks are part of live-config, which kicks in just after initramfs. At that point they must be available somewhere. One solution could be, if hooks are detected with toram. then remount the usb somewhere else.
Rsync is a powerful tool with excludes, filters and whatever but can get quite complex. We got into difficulty earlier with /live directory because it can't simulate "mkdir -p", I never knew that till now and the man page wasn't clear. A second rsync line might be simpler.
thwak

- thwak
- Posts: 174
- Joined: Tue Nov 20, 2012 3:58 am

## Re: Load to RAM option at Boot

Tue Jan 31, 2017 9:04 pm

links to illustrate how n where antiX live-init handles toram & toram-eject, FYI
https://github.com/BitJam/Live-initrd/b ... init#L3717
toram-eject
https://github.com/BitJam/Live-initrd/s ... 93&q=toram
dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: Load to RAM option at Boot

Tue Jan 31, 2017 11:54 pm

Thanks for the reminder, thwak. It's been on my list for a while to investigate the antiX live scripts.. 5048 lines (just the main script) is why it hasn't happened yet. Any pointers to documentation explaining how it ticks appreciated, more so if you yourself know that system well.
thwak

- thwak
- Posts: 174
- Joined: Tue Nov 20, 2012 3:58 am

## Re: Load to RAM option at Boot

Wed Feb 01, 2017 7:50 am

I've never found developer documentation for antiX live-init, and 5K LOC is just the above-waterline part of the iceberg. It sources multiple custom utility scripts; those, in turn, source other scripts... and some of the puzzle pieces you'll be looking for, they don't even exist until created during runtime! That latter characteristic may be common across init systems. I lack the experience to have a basis for comparison.
The userdocs here for live-boot https://github.com/antiX-Linux/live-boot-docs-antix are outdated, compared to the docset shipped in the iso.
The init script is comprised of about 210 functions. On demand while studying the script, that makes it easy to roughly trace what happens where
and the script has 9 (IIRC) breakpoints in case you need to debug something. I'll chat about any specific questions but I'm not real confident in my understanding of its nitty-gritty workings.
dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: Load to RAM option at Boot

Sun Feb 05, 2017 12:23 pm

> What I'd like to do (topic for another thread if I knew enough to say anything intelligent about it) is fix it so that if you boot a multiboot usb toram, it would only copy the system you want to boot instead of copying the whole first partition to ram

.
Try this totally undocumented cmdline parameter with a standard initrd:

Code:
  `toram=filesystem.squashfs`

fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Load to RAM option at Boot

Sun Feb 05, 2017 2:23 pm

Code:
  `Copying /live/medium/refracta8_amd64/live/filesystem.squashf to ram...`

First partition on the usb is 8GB. I'm only using 1GB ram.
Been wondering about that 'toram=' thing. This gem and the fact that toram works with findiso are going into the help file. Thanks.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Load to RAM option at Boot

Sun Feb 05, 2017 3:54 pm

I think we can mark this thread as solved. Let me know if you see any problems with the text below.

> MULTIBOOT USB TORAM
> Using the toram option with a multiboot live-usb causes the entire
> first partition to be copied to RAM. This fails if the partition is
> larger than the available RAM. Note that this does NOT occur if you
> use an intact iso file with the findiso option (ISO_2 in main menu)
> For a live system made from unpacked iso or from live session, add
> the following to the boot command:
> toram=filesystem.squashfs
> For a live system made from intact iso and using findiso option,
> just adding 'toram' will work (ISO_2).

dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: Load to RAM option at Boot

Sun Feb 05, 2017 5:10 pm

Your text is perfectly clear. Unlike live-boot's man page which doesn't even mention "toram=anything" (set in "9990-cmdline-old").
It was after all worth the script experiments because I also worked out how to detect live-hooks and copy them into ram. More on another time.
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: Load to RAM option at Boot

Mon Feb 06, 2017 11:06 pm

I started a thread in the howto section. Feel free to add to it.
multiboot-usb-toram-t690.html?sid=16f93a29f739e53345f7df04c685f34a#p6530
Post a reply
Jump to:

Powered by phpBB © phpBB Group.

phpBB Mobile / SEO by Artodia.