LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories
User Name
Password
LinuxQuestions.org Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.

Notices


Reply
  Search this Thread
Old 12-14-2012, 08:06 PM   #1
a-relieved-pup-here
LQ Newbie
 
Registered: Jul 2010
Posts: 12

Rep: Reputation: 1
Thumbs up Linux livedvd copied to hd partition, booting close to installed.


Just to put the info out there.............

Wow. I may have done something here.
I installed Zorin 3.1 on a separate partition. The zorin is updated as
best I know how. It reached 4.5 GB in size. Did a backup (tar) of my
home directory to my Common_Store partition.
Ran Remastersys to create an install iso. Excluded /cdrom/* /dev/* /media/*
/proc/* /sys/* and /tmp/*. I also excluded the symlink to my Common_Store
partition. Common_Store partition was also designated as Remastersys'
destination. (Remastersys probably excludes it's working directory,
but my Common_Store partition is 350GB. It'd run me out of disk space if it
wasn't excluded. Happened to me last year.) Created an iso for distribution.
I made a directory folder /livecd on ROOT (/), did a
# sudo mount [path to/and iso] /livecd -o loop
Made directory for destination,
# mkdir /tmp/target ## mounted destination partition on it,
# sudo mount /dev/[partition] /tmp/tartget ## changed into /livecd
# cd /livecd ## and copied the iso to it.
# sudo cp -rv .[a-zA-Z0-9_]* /tmp/target/
# sudo cp -rv [a-zA-Z0-9_]* /tmp/target/
* Thanks go to Qqmike's documentation on kubuntuforums for posting these cp lines.
I then made a custom addition to /etc/grub.d as follows ( I'm using GRUB2 )
cat /etc/grub.d/25_custom (output is):
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "sdaX Live Image w/ Persistence" {
insmod ext2
set root='(hd0,X)'
search --no-floppy --fs-uuid --set XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
linux /casper/vmlinuz --no-floppy file=/cdrom/preseed/custom.seed boot=casper ramdisk_size=1048576 root=/dev/ram rw persistent
initrd /casper/initrd.gz
}
menuentry "sdaX Live Image (Recovery Mode) w/ Persistence" {
insmod ext2
set root='(hd0,X)'
search --no-floppy --fs-uuid --set XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
linux /casper/vmlinuz --no-floppy file=/cdrom/preseed/custom.seed boot=casper ramdisk_size=1048576 root=/dev/ram rw persistent single
initrd /casper/initrd.gz
}
menuentry "sdaX ***DON'T***INSTALL*** Live Start or Install" {
insmod ext2
set root='(hd0,X)'
search --no-floppy --fs-uuid --set XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
linux /casper/vmlinuz --no-floppy file=/cdrom/preseed/custom.seed boot=casper ramdisk_size=1048576 root=/dev/ram rw --
initrd /casper/initrd.gz
}
(I X'd out partition block id and uuids. Credit also goes to Qqmike for part of this.)

-- edit-- I'm adding, This 25_custom file needs to be executable.

25_custom created so it runs before os_prober and puts GRUB line for it above MS.
Then did a
# sudo update-grub
I also made a partition for persitent storage with explicit label 'casper-rw' .
# sudo mkfs.ext3 -L casper-rw /dev/sdaXX
On 1st boot of it with persistence, I opened a terminal and sudo su'd to set password.
#(@ terminal)
# sudo su
# passwd root
#
# exit
Then rebooted to recovery mode. Entered root login. Added my own user name copying
user 'live's home directory. Had to first make a group for my user.
# groupadd -g 1000 [my user name]
# useradd -g 1000 -k /home/live -m -s /bin/bash -u 1000 [my user name]
Did a 'id live' to display live's groups something like
uid=999(live) gid=999(live) groups=999(live),[some#]([somegroup]),[some#]([somegroup]), etc...
I used usermod to match groups.
# usermod -G [some#],[some#], ... [some#] -a [my user name]
(-a option appends, without, I think it drops previous groups. I don't know what happens
if same name group id 1000 gets dropped. It might not let it happen.)
Set [my user name]'s password. ( # passwd [my user name] # )
Anyway I also edited the file /etc/gdm/custom.conf and changed the line
AutomaticLogin=live to AutomaticLogin=[my user name]

Changed into my /home/[my user name] ( # cd /home/[my user name] # )
and extracted my saved (tarred) [my user name].tgz into it.
On reboot into live with persistent its worked. The only note is that the livecd's
user 'live' is auto logged in on all the available tty's. But [my user name] auto logs on
to X-session and everything appears to be working.
The original install of 4.5 GB is now sitting on a total of 2GB.
Thats total of the live partition + casper-rw partition. What this means is,....
This won't work for multiple live partitions, cause if they try to point to the same
casper-rw partition they will bork each others settings. The one exception known to me
is AV Linux which uses a persitent partition labled live-rw. But I won't use it cause
it auto-mounts all partitions at boot. I think that's a bad idea, personally.

Last edited by a-relieved-pup-here; 12-14-2012 at 08:24 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] syslinux error when usb booting Scientific linux 6.0 LiveDVD possum Linux - Enterprise 1 04-03-2011 04:10 PM
Folders copied from linux to fat32 partition don't show up. glore2002 Slackware 2 09-03-2008 05:43 AM
Can a Linux OS be copied or moved from one partition to another ? brjoon1021 Linux - General 5 07-17-2007 02:21 PM
WinXP can't read linux files copied to FAT32 partition gdh Linux - General 1 08-07-2004 10:31 AM
A source close to SCO: "linux code has been copied in to system V" qanopus General 4 06-12-2003 01:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories

All times are GMT -5. The time now is 08:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration