Unable to boot Ubuntu using TORAM=yes (copy livecd to RAM)

Bug #25496 reported by Neilsanner
116
This bug affects 15 people
Affects Status Importance Assigned to Milestone
casper (Baltix)
Fix Released
Undecided
Unassigned
casper (Ubuntu)
Fix Released
Wishlist
Unassigned
Declined for Feisty by Kees Cook
Declined for Karmic by Kees Cook
Lucid
Fix Released
Wishlist
Unassigned

Bug Description

Hi,

It would be nice if there would be a way to copy the entire live CD to ram an
run ubuntu from there?

As for an example, in Knoppix this can be done by:
knoppix toram

neilsanner

Related branches

Revision history for this message
joh6nn (joh6nn) wrote :

seconded; this is an extremely useful feature.

Revision history for this message
Wouter Stomp (wouterstomp-deactivatedaccount) wrote :

Very nice indeed! I would have to buy some extra ram though then...

Changed in casper:
status: Unconfirmed → Confirmed
Revision history for this message
Linuxonlinehelp_de (linuxhelp) wrote :

Yes it would be nice

or with added function to remaster the Live-CD like damnlinux

with toram at every boot.. for secure Internet PC

Revision history for this message
Robbie Groenewoudt (dutchmega) wrote :

I also would like this feature. Considering I have 1GB of memory and Ubuntu doesn't use more then 200mb.

Revision history for this message
mon (javiermon-deactivatedaccount) wrote :

Hi

I would also like this feature. The new fedora core 6 live has this feature and it makes it great to use it on systems with 1gb+ memory

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote : It would be nice to have ability to start when filesystem.squashfs is in hard disk

I think Ubuntu LiveCD should have ability to use filesystem.squashfs not only from CD, but also from hard disk or other storage device.
It would be nice if casper would have an ability to mount storage device, specified in some live-cd command-line parameter and use filesystem.cloop file from this device.

Revision history for this message
Marco Amadori (marco-amadori) wrote : Re: toRam or copy2Ram (run ubuntu live from ram)

Fixed after latest merge from Debian.

Look at bootparam "toram".

Revision history for this message
mon (javiermon-deactivatedaccount) wrote :

Maybe the livecd interface should have a more visible option to turn this on?

Revision history for this message
Neilsanner (neilsanner) wrote : Re: [Bug 25496] Re: toRam or copy2Ram (run ubuntu live from ram)

Nice! Thanks!

neilsanner

----- Original Message ----
From: Marco Amadori <email address hidden>
To: <email address hidden>
Sent: Saturday, February 17, 2007 7:40:53 PM
Subject: [Bug 25496] Re: toRam or copy2Ram (run ubuntu live from ram)

Fixed after latest merge from Debian.

Look at bootparam "toram".

--
toRam or copy2Ram (run ubuntu live from ram)
https://launchpad.net/bugs/25496

____________________________________________________________________________________
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html

Revision history for this message
livesys (livesys) wrote : Re: toRam or copy2Ram (run ubuntu live from ram)

Is the toram fix included in the latest LiveCD release?

I tried to use toram via F6 boot menu in the Herd5 and 20070304 LiveCD iso of Xubuntu but the CD still not copied to ram.

Synaptic show that Casper 1.81 package is installed.

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote : Re: toRam and toDisk (copy ubuntu live CD to ram/hard disk during startup)

livesys at 2007-03-05 wrote:
> Is the toram fix included in the latest LiveCD release?

NO, Ubuntu's casper still hasn't merged all the modifications, related to "todisk" and "toram" from Debian's casper 1.81. It seems we should just add one function - "parse_cmdline ()" to scripts/casper file from Debian casper package. This function has such code:
[..]
    toram)
        export TORAM="Yes" ;;
    todisk=*)
        export TODISK=${x#todisk=} ;;
[..]

Marco Amadori at 2007-02-18 wrote:
> Fixed after latest merge from Debian.
> Look at bootparam "toram".

No, no, no, this bug still isn't fixed :(

Revision history for this message
livesys (livesys) wrote : Re: toRam or copy2Ram (run ubuntu live from ram)

Thank you for the update Mantas.

This explain why toram is not working with all the LiveCD images I have been testing including 20070319.

Revision history for this message
Tollef Fog Heen (tfheen) wrote :

This has been fixed with the merge from Debian.

Changed in casper:
status: Confirmed → Fix Released
Revision history for this message
livesys (livesys) wrote :

toram is still not working as a boot parameter.

Using 20070404 Ubuntu LiveCD with Casper 1.85

Revision history for this message
livesys (livesys) wrote :

toram is still NOT WORKING as a boot parameter.

Using 20070407 Ubuntu LiveCD with Casper 1.86

Revision history for this message
livesys (livesys) wrote :

toram is still NOT WORKING as a boot parameter.

Using 20070414 Ubuntu LiveCD with Casper 1.87

Revision history for this message
Christian Gunning (helmingstay) wrote :

I just tried, toram not working :(
Using casper 1.87 and, i think, 20070417 i386 livecd.

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

Reopening this bug, as toram and todisk boot parameters doesn't work in Feisty final and I can't find that toram/todisk is handled in parse_cmdline() function (look at https://bugs.launchpad.net/baltix/+source/casper/+bug/25496/comments/11 ) in casper's Ubuntu branch (https://code.launchpad.net/~ubuntu-core-dev/casper/trunk ). Tfheen, did you checked carefully if bug is really fixed before marking as fixed ?

Changed in casper:
status: Fix Released → Unconfirmed
Revision history for this message
livesys (livesys) wrote :

Status Update:

NOT WORKING - Ubuntu LiveCD 7.04 Release w/ Casper 1.87

Perhaps another merge with Debian Live Project (http://debian-live.alioth.debian.org/) is needed as the toram function on any of their available LiveCD images is fully functioning.

Thank you.

Revision history for this message
Christian Gunning (helmingstay) wrote :

just tried again, still not working. this bug seriously limits the usefulness of all the ubuntu live disks...

looks like we'll have to use damn small linux for testing and thin clients until this gets fixed.

Revision history for this message
Christian Gunning (helmingstay) wrote :

Is this bit of news from Debian Live perhaps relevant?

http://debian-live.alioth.debian.org/

"2007-05-24: casper is dead, long lives live-initramfs

Forked casper. [...] "

Revision history for this message
Andrea Garbarini (garba) wrote :

any chance to get this fixed for hardy? :(( i've just checked the initramfs-scripts but i can confirm that on gutsy the capser scripts doesn't seem to honor the "toram" boot parameter

Revision history for this message
Peter Cordes (peter-cordes) wrote :

It sort of works to boot Intrepid's livecd with TORAM=yes, but you have to give it a kick with ALT+SYSRQ+E when it gets stuck after the message from the squashfs module.

 The code for doing stuff if $TORAM is set (to non-zero length, IIRC) is there, but nothing sets $TORAM. So do it yourself from the kernel command line. /init inherits kernel params as env vars, and /scripts/casper inherits them too.

 I have booted an i386 with 1.5GB of RAM from Intrepid alpha5 on a USB stick, with TORAM=yes + a sysrq kick, and it did work.

Revision history for this message
Peter Cordes (peter-cordes) wrote :

> I have booted an i386 with 1.5GB of RAM from Intrepid alpha5 on a USB stick, with TORAM=yes + a sysrq kick, and it did work.

 Actually, what worked was PXE booting with TORAM=yes.

 TORAM=yes doesn't work with isoscan/filename=, which is how I had my USB drive set up.

Colin Watson (cjwatson)
Changed in casper:
assignee: nobody → evand
Revision history for this message
Jon Packard (jonpackard) wrote :

I created a simple bootable Intrepid image by following directions here: https://help.ubuntu.com/community/LiveCDCustomizationFromScratch and am booting it from my USB drive. I first tried it with "toram" and it had no effect. I then tried "TORAM=yes" and it worked without any problems. I did not have to do any keyboard combination to make it work. Perhaps there has been some improvement on this since last September. I also tested this with an old 8.04 RC disc I had laying around. I had to do the ALT+SYSRQ+E trick, but otherwise it worked fine.

Revision history for this message
Przemek K. (azrael) wrote :

Is it really so hard to add such a simple option to the livecd boot menu?
Fedora has it for almost 3 years!

Revision history for this message
Christian Gunning (helmingstay) wrote : Re: [Bug 25496] Re: toRam or copy2Ram (run ubuntu live from ram)

I agree. Total regression from circa 2005! Frustrating.

Now we've seen that it's possible to build an image where the token
works a la Jon Packard. Would filing a new bug help get it into the
official package?

2009/4/16 Przemysław Kulczycki <email address hidden>:
> Is it really so hard to add such a simple option to the livecd boot menu?
> Fedora has it for almost 3 years!

Revision history for this message
Przemek K. (azrael) wrote : Re: toRam or copy2Ram (run ubuntu live from ram)
Przemek K. (azrael)
summary: - toRam or copy2Ram (run ubuntu live from ram)
+ Unable to boot Ubuntu livecd to RAM
tags: added: needs-coding
Revision history for this message
Przemek K. (azrael) wrote : Re: Unable to boot Ubuntu livecd to RAM

Here's a photo of my laptop when I tried to boot with "TORAM=yes" and without "quiet splash" options.
The Jaunty livecd hanged and there was no sign of progress. The photo is from the hang.
ALT+SYSRQ+E didn't help - it just dropped me to busybox console - what should I do with it? Exiting resulted in kernel panic, running ./init 5 failed too.

Revision history for this message
DearFriend (appraprv) wrote :

You need 4 or higher GB of RAM to use "TORAM=yes" <br>
otherwise the step https://wiki.ubuntu.com/BootToRAM#Patch%20boot%20scripts is required
with this "hack" 1+GB is always enough

Revision history for this message
Przemek K. (azrael) wrote :

Ubuntu 9.04 failed to boot to RAM on my desktop PC with 4GB of RAM.

Przemek K. (azrael)
summary: - Unable to boot Ubuntu livecd to RAM
+ Unable to boot Ubuntu using TORAM=yes (copy livecd to RAM)
tags: added: livecd
Revision history for this message
Przemek K. (azrael) wrote :
Revision history for this message
DearFriend (appraprv) wrote :

how long did you wait boot process?
unpacking 3GB is so long...

Did you try to do all instructions https://wiki.ubuntu.com/BootToRAM ?
Your first link was the source for BootToRAM howto on wiki.

Revision history for this message
Przemek K. (azrael) wrote : Re: [Bug 25496] Re: Unable to boot Ubuntu using TORAM=yes (copy livecd to RAM)

I waited over 15 minutes. There were no signs of activity on my PC,
the DVD was not spinning.
I didn't try the instructions from the wiki, I used a stock Ubuntu CD.

On Mon, Jul 6, 2009 at 10:02 PM, DearFriend<email address hidden> wrote:
> how long did you wait boot process?
> unpacking 3GB is so long...
>
> Did you try to do all instructions https://wiki.ubuntu.com/BootToRAM ?
> Your first link was the source for BootToRAM howto on wiki.
>
> --
> Unable to boot Ubuntu using TORAM=yes (copy livecd to RAM)
> https://bugs.launchpad.net/bugs/25496
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
## Przemysław Kulczycki >><< Azrael Nightwalker ##
# jabber: azrael[na]jabster.pl | tlen: azrael29a #
### www: http://reksio.ftj.agh.edu.pl/~azrael/ ###

Revision history for this message
hahahafr (ullrich-999) wrote :

@Przemysław Kulczycki:
How did you do if you didn't use the instructions from the wiki?

Revision history for this message
Cdr_RF (g-ford9) wrote :
Download full text (4.4 KiB)

The details of a workaround that I use to load the Jaunty 9.04 Live CD into RAM on a desktop PC that has 2GB of PC memory are as follows:

Boot using the Ubuntu LiveCD > English > [F6] key > [Esc] key > Use the keyboard to edit the right end of Boot Options: delete 'quiet splash' add TORAM=Yes > Hold down the right arrow key until you get to the far right > [Enter] key.

As seen in the dmesg output lines for my machine at the bottom of this post, the monitor screen stops scrolling at 7.8 seconds and then resumes scrolling again at 177.8 seconds. During the time that scrolling is interrupted, the DVD's front panel LED is on continuously. When I see 'squashfs,' (see 177.9 seconds below) on the monitor screen, I wait 30 seconds and then use the kick it procedure mentioned previously by others in this and other Bug reports. I quickly press and hold down the following keys one-at-time in this order: [Alt]+[Sys Rq]+[e]. If the monitor screen doesn't start scrolling again within about 10 seconds after you kick it, kick it again. You may have to kick it again the second time even when you see the desired 'SysRq : Terminate All Tasks' on the screen. I estimate that you can kick it again the second time up until at least 60 seconds after you have kicked it the first time. The key thing to look for after you kick it is for the screen to resume scrolling again.

If you have an older PC or a slower CD reader, it will take longer to mount the LiveCD to RAM than is shown in the previous paragraph. Moreover, it may not even be possible to mount to RAM with older PCs, I would guess. (If I recall correctly, I was unable to use this workaround to mount Jaunty to RAM on a two year old Toshiba laptop with 3GB of memory and a single-partition 200GB NTFS hard drive, although skilled users may be able to customize Boot Options further to make it work.)

When the Ubuntu Desktop appears, a 'Software Packages Volume Detected' window pops up. Click [Cancel], unless you don't mind taking a long long time working through this, as I recall. A Ubuntu 9.04 i386 icon should also be on the Desktop.

Pat Double, who developed and maintains Incognito 2009.0 Beta, hopes to switch from Gentoo Linux to Ubuntu ( http://anonymityanywhere.com/incognito/ ). The potential increase in demand for Ubuntu due to this prospective switch coupled with the social good of possibly increasing anonymity somewhat (carefully peruse Incognito's usage limitations) on the Internet by using a LiveCD Incognito should be enough impetus to persuade Ubuntu's programming talent or whomever to at least eliminate the need for kicking future versions of Ubuntu in order to mount Live CDs to RAM.

(The Incognito 2009.0 Beta LiveDistro mounts to RAM if you add 'docache' to its Boot Options [in lieu of Ubuntu's TORAM=Yes] plus it comes with a MAC address changer option on its initial boot screen that is very useful for quickly changing one's identity even for those who connect to the Internet by directly connecting a single PC to a modem. No kicking is required with Incognito 2009.0 Beta with the PC mentioned herein. [I do, however, have to be sure that the PC's clock is set to UTC time.])

I suppor...

Read more...

Revision history for this message
Dylan Taylor (dylanmtaylor) wrote :

This is insanely useful and I believe that we should make it possible to use this feature if the user has enough RAM. Because toram doesn't work, making a Live persistent USB stick is much harder that it needs to be on a netbook...

Revision history for this message
Przemek K. (azrael) wrote : apport-collect data

Architecture: i386
DistroRelease: Ubuntu 9.10
LiveMediaBuild: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
Package: casper 1.206
PackageArchitecture: i386
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
Uname: Linux 2.6.31-14-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Przemek K. (azrael) wrote : Dependencies.txt
Revision history for this message
Przemek K. (azrael) wrote : XsessionErrors.txt
tags: added: apport-collected
Revision history for this message
Przemek K. (azrael) wrote :
Revision history for this message
Przemek K. (azrael) wrote :
Revision history for this message
Przemek K. (azrael) wrote :

I tried booting Karmic livecd with TORAM=yes, but it didn't load to RAM.
The interesting fragment of the logs is:
Begin: Running /scripts/casper-premount ...
Done.
Done.
Begin: Copying live_media to ram ...
/init: line 1: head: not found
expr: syntax error
Warning: Not enough free memory (k > 741227k) to copy live media in ram.
Done.
Done.
Begin: Running /scripts/casper-bottom ...

Revision history for this message
Sanjeeb (smishra) wrote :

I successfully booted to the ram with my customized squash filesystem
My requirement was different. I need to always boot to the ram with the customized filesystem so i just added this.

Based on hardy : Script casper :
You need to add <Line to add> under the follwing lines <snip>.
<snip> Find in casper
if [ ! -z "${NETBOOT}" ]; then
        if do_netmount ; then
            livefs_root="${mountpoint}"
        else
            panic "Unable to find a live file system on the network"
        fi
    fi

<snip>

<Line to add>
     mkdir /myfs
     mount -t tmpfs -o size=2G none /myfs
     mkdir /myfs/casper
     cp /scripts/filesystem.squashfs /store/casper/ # just hardcoded in initrd add this and regenerate
     mount -o bind /myfs /cdrom
     livefs_root=/cdrom # just tell that the filesystem is under cdrom

<line to add>

You can remove the scanning of devices which will take extra time.

Revision history for this message
Sanjeeb (smishra) wrote :

cp /scripts/filesystem.squashfs /store/casper/
just replace store with myfs which was inreference to https://wiki.ubuntu.com/BootToRAM

Revision history for this message
kfix (kfix) wrote :

sed -i -e "s/ head -n 1 / awk 'NR==1' /g" /usr/share/initramfs-tools/scripts/casper

That will restore rambooting capability. please....Merge....IT! This bug is ancient.

TORAM is handy for reprovisioning a remote system by dropping the live-cd files in its /boot.

casper's TORAM=yes isn't as nice as debian:live-initramfs's toram= flag which identifies and copies the specific squashfs file that will be root'd. casper copies the entire cdrom which contains megs of extraneous kernels and any more stuff a 3rd party could remix into their ubuntu cd's.

I really hope the proposed live-initramfs 2.x bears fruit as both of these packages are crufty....
http://michael-prokop.at/blog/2009/09/11/debian-considerations-regarding-redesign-of-live-initramfs/

Revision history for this message
Przemek K. (azrael) wrote : Re: [Bug 25496] Re: Unable to boot Ubuntu using TORAM=yes (copy livecd to RAM)

2010/1/16 joeykork <email address hidden>:
> sed -i -e "s/ head -n 1 / awk 'NR==1' /g" /usr/share/initramfs-
> tools/scripts/casper
>
> That will restore rambooting capability. please....Merge....IT! This bug
> is ancient.

Can you prepare a patch using your sed oneliner and post it here?
It's easier for the developers to work on patches and debdiffs rather
than such sed oneliners which have to be converted to patches anyway.
Having a patch posted to this bug (make sure to mark it as a patch)
will allow the devs to merge it sooner.

--
## Przemysław Kulczycki <<=>> Azrael Nightwalker ##
# Jabber/XMPP/Gtalk/Tlen ID: azrael[na]jabster.pl #
# (Co to jest? Zobacz na: http://jabberfaq.info ) #
## www: http://reksio.ftj.agh.edu.pl/~azrael/ #####

Revision history for this message
ack (ack-acknowledge) wrote :

How is this?

tags: added: patch
Revision history for this message
Petar Bogdanovic (petar-smokva) wrote :

@ack

It's a punch in my face.

Changed in casper (Ubuntu):
status: New → Confirmed
Kees Cook (kees)
Changed in casper (Ubuntu Lucid):
assignee: Evan Dandrea (ev) → nobody
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package casper - 1.220

---------------
casper (1.220) lucid; urgency=low

  * scripts/casper: calculate memory without "head" utility, thanks to
    Petar Bogdanovic (LP: #25496).
 -- Kees Cook <email address hidden> Fri, 19 Feb 2010 14:04:18 -0800

Changed in casper (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Erik B. Andersen (azendale) wrote :

If this is fixed now, shouldn't this brainstorm idea be updated? http://brainstorm.ubuntu.com/idea/1503/
I haven't tested to see if it works, so I don't want to mark it as implemented if it isn't.

Revision history for this message
Martin Erik Werner (arand) wrote :

I tested this before and confirmed that it worked.
I'm afraid brainstorm seems somewhat abandoned by now, but go ahead.

Revision history for this message
actionparsnip (andrew-woodhead666) wrote :

Can we use this in an installed system? Can we have some examples of boot options in grub and grub2 based on "default" settings.

I think this would help lots

Cheers

Changed in casper (Baltix):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.