Stuff that has not yet gone into the official build.
Post a reply
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## why not just download and extract

Tue Dec 13, 2011 10:14 pm

I got to thinking...
Instead of burning a cd or dd'ing a usb stick or even doing a hard drive install wouldn't it be easier (and cooler) to just download a compressed file, extract it to the partition, update fstab and the bootloader, and done. Am I missing anything?
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: why not just download and extract

Fri Dec 16, 2011 3:26 am

Let me clarify...
I was working on a new build and while I was doing it I had problems using snapshot as well as the debian live tools. I got mad. It made me wonder why I bother going to the trouble of creating a live image when all I really needed to do was compress the build, extract it on my other partition and then edit fstab and grub.
Now that got me thinking more....Why not use that method for other computers? Obviously the computer would need a os already installed (or a live system) that could extract the filesystem and edit fstab and grub. But it would be simpler to create as you wouldn't need to worry about getting a working making a live image from a standard filesystem and then turning that live system back into a traditional system and so on and so forth.
just thinking out loud....
fsmithred

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

## Re: why not just download and extract

Fri Dec 16, 2011 6:12 pm

I guess it depends on what you're looking for as the final product. There are reasons for having a live system other than to install to hard drive. You can take it with you and run it on a friend's computer, and you can have a system that's resistant to attacks (i.e. if you think you got rooted, just reboot.) I recently gave a refracta CD to a friend so she can feel safer doing her online banking.
If you're having trouble with the snapshot tool or the installer, you could talk to the maintainer. I understand that he's pretty receptive to questions and suggestions.
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: why not just download and extract

Sat Dec 17, 2011 5:32 pm

True dat! I am certainly not suggesting it replace a live image or anything. But for those experiments where you just cant get a live image created or just want something to keep around because you might want to install it later then going through the process to make a live image is sort of pointless and aggravating as fsck when things don't go right.
I would of bugged the maintainer but my tool failed, refracta tool failed, and even debian live tools failed so it had to be something on my end anyway. I was trying to make a live image from a base debian sid install with the latest kernel I could get and a jhbuild version of gnome shell. I probably would of asked even then but once it hit me that I didn't really need to make a live cd then the whole problem was alleviated. But I kept getting a error like init /lib/udev/ cdrom device not found or something to that effect. I was dd'ing the image to a usb device so not sure if udev was having a freak fit or what. dunno dunt care
dzz

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

## Re: why not just download and extract

Sat Dec 17, 2011 6:10 pm

Depending how it's compressed, it could be quite large (what is better than squashfs?)
If you did a build in a local directory, by whatever means, it should be possible to transfer that, compressed or not, to a partition and boot it in exactly the same way as you would do a normal Debian install from debootstrap'chroot in a partition. (having installed a kernel, edited fstab and done grub)
The debian-live "magic" is not activated on boot unless "boot=live" is on the cmdline, it should boot as a normal system
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: why not just download and extract

Tue Dec 20, 2011 4:00 am

Yep, exactly what I was thinking.
Just squash up the system and unsquash it somewhere else, edit fstab, edit grub, done. A novel way of installing.
I guess it could be used as a backup system also. I think me and phred discussed that one other time.
fsmithred

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

## Re: why not just download and extract

Tue Dec 20, 2011 10:23 am

Yes, we talked about it, and we had some problems running mksquashfs when we ran it on the running system instead of on an rsync copy of the system. Check some of our emails from last April. Here's something I wrote then:

> Had to edit the excludes file and remove the leading slashes,
> because it was saying it couldn't find stuff like //home/ and //proc. Also
> removed the -regex option to get rid of the error regarding "prefix ./ and
> ../ in excludes file not supported with -wildcards and -regex".

dzz

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

## Re: why not just download and extract

Tue Dec 20, 2011 7:16 pm

mksquashfs won't work on a running system, too much temp stuff changing before it can complete, probably other reasons. You need to rsync/cp it somewhere else first with the right "excludes" (like snapshot does... might as well use snapshot)
Re : installing direct from squash, without actually booting a kive system and running a dedicated installer. Here's a real test I did today, on an mounted, empty ext3 partition (/dev/sdb8), using filesystem.squashfs from a Refracta iso :
1.

Code:
  `unsquashfs -f -d /media/sdb8 /path/to/filesystem.squashfs`

2. Get the uuid string of /dev/sdb8 (blkid /dev/sdb8) we will call it $DEVUUID
3. Write a basic fstab to /media/sdb8/etc/fstab

Code:
  `# /etc/fstab: static file system information.
  # <file system> <mount point> <type> <options> <dump> <pass>
  UUID=$DEVUUID / ext3 relatime,errors=remount-ro 0 1`

4. I use grub-legacy. Adapt this entry (and root/kernel/initrd names) to whatever bootloader you use. Maybe update-grub(2) will just find it.

Code:
  `title Refracta Unsquashed
  root (hd1,7)
  kernel /boot/vmlinuz-2.6.32-5-686 root=/dev/disk/by-uuid/$DEVUUID ro
  initrd /boot/initrd.img-2.6.32-5-686`

5. It's up and running before the kettle has boiled and I can't see anything wrong with it. We have by-passed the live-boot step.
Refracta has a preconfigured user, hostname and root password. Usual debian-live builds don't, there would be a bit of chroot work to do then.( shadowconfig, passwd.adduser, hostname maybe more)
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: why not just download and extract

Sun Dec 25, 2011 4:32 am

good info dzz!
Yea getting the excludes right for mksquashfs is a real *****.
It might be nice to keep the system clean and never have it booted and running anyway. Do all the work from a different partition and then squash it up nice and clean. Then when unsquased, chroot in and setup the system. Interesting....
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: why not just download and extract

Mon Dec 26, 2011 12:58 am

I love this. It is almost too simple and easy. You can squash up any crazy creation and not have to worry about turning it into a live system or anything. Very cool. Love it! I guess a tool to unsquash and configure a few things would be good but it is easy enough without one.
Post a reply
Jump to:

Powered by phpBB © phpBB Group.

phpBB Mobile / SEO by Artodia.