Another kind of dual boot! / = Slax live CD! ~ = hard drive!


Page 1 of 2 12 LastLast
Results 1 to 15 of 21

Thread: Another kind of dual boot! / = Slax live CD! ~ = hard drive!

  1. #1
    Join Date
    Oct 2002
    Location
    Binghamton NY
    Posts
    2,435

    Exclamation Another kind of dual boot! / = Slax live CD! ~ = hard drive!

    My god, this seems huge to me! I can't be the first person who ever thought of this, so maybe there's going to be going to be a problem that I can't foresee just yet. Right now, it's been less than an hour since I tried it for the first time, and it seems like I discovered the easiest way to run Linux
    It's a simple idea, really. I just booted my Slax live CD, and mounted the hard drive as the home directory. Since the Slax CD runs as root, I mounted the hard drive as /root.

    I know it sounds scary to be running as root, but pretty much all of the special dangers of running in root involve the root user's ability to overwrite anything in the system, and that doesn't apply in the case of a live CD. A live CD is really and truly read-only. I think probably you're more secure running as root on a live CD than as a normal user with a hard drive install. Does anyone disagree?

    So the system is running on a CD, but all my data is on the hardrive., where it will remain after the next reboot. All my configuration files will be saved. When I come back to my home directory, it'll still be home.

    Again, I am running as root, even though in many ways I'm probably more secure than you are right now. But there no passwords and no permissions to negotiate. It's really smooth and easy. When I want to mount something, I just mount it. To that, add this awesome packaging system, which will allow me to add more packages with just a single click from the Slax build page, and the fact that everything seems to run really solid, and... really seems too good to be true.

    So here's I did this. It was super easy.
    Code:
    boot the Slax CD in text mode and log on.
    
    #cd /
    
    #mount /dev/hdc3 /root
    
    #cd
    
    #xconf
    
    #startx
    Does anybody know anything about what happens when you do this? Is there a fly in the ointment that I don't know about? I'm thinking, hell, there must be!

  2. #2
    Join Date
    Sep 2000
    Location
    N California
    Posts
    953
    Knoppix proposes this idea in the how-to. The only difference is to use a USB stick. The boot command has options to mount the m'stick during boot.

    A live CD and a USB drive can make for a very usable system. Especially now that USB sticks are at 8/16GB.

  3. #3
    Join Date
    Oct 2002
    Location
    Binghamton NY
    Posts
    2,435
    Quote Originally Posted by teeitup View Post
    Knoppix proposes this idea in the how-to. The only difference is to use a USB stick. The boot command has options to mount the m'stick during boot.

    A live CD and a USB drive can make for a very usable system. Especially now that USB sticks are at 8/16GB.
    Hey, don't forget those Western Digital "my book" drives! They're not really "sticks", but they are USB devices, and these days they go up to a terabyte. I have two that are 500 GB each.

    The thing is that Slax has it all over Knoppix or anybody else for being simple and straightforward to use. Have you seen the slack build page? It's incredible, an honest-to-god one-click install. It took me a while to figure it out, in large measure because I just wasn't expecting to be so incredibly easy.

    Plus it's a custom CD. I'm burning a new Slax CD right this minute. This time I filled it up. It took a couple of hours to pick out 650 mb of packages, but this is gonna be one kickass live CD.

    And there's still options for temporarily installing software in the RAM, not only through that awesome one-click build site, but I've also included software in this disk that will facilitate installing slackware .tgz packages, compiling packages, and even installing .deb packages!

    http://www.slax.org/modules.php

    http://www.slax.org/build.php

  4. #4
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,984
    I have tried the steps but didn't get much joy.

    What it appears (my own speculation) could be what the "chroot" command has been doing for years.

    A user in Linux A can "change root" to Linux B which will be totally operational in its terminal mode. Certain distros can allow the Linux B to fire up the desktop by command startx but there may be restrictions and so not universally applicable. When I tried this in the past I managed to jump from the first Linux to the 2nd, from the 2nd to the 3rd and everything seemed to stop at the 4th Linux. One can backtrack from Linux to Linux by "exit" command in the terminal.

    The chroot is a very powerful feature of Linux because we can use any Linux A, say from a Live CD, to get inside an unbootable Linux B. The theory is based on a boot-up Linux has an operational kernel available to run any Linux B in a dormant state. This is the priciple of why a Live CD Linux with only Grub can rescuse an unbootable Linux B that uses Lilo as the only boot loader. Since Linux A has no Lilo installed but it can run the Lilo command of Linux B. Equally a Live CD Linux uses only Lilo, typical of the Slax family, can restore an unbootable Linux booted only by Grub.

    The action described in this thread is not strictly dual booting because the second Linux does not use its own kernel. The incompatibility of using the kernal of Linux A to run Linux B will eventually surfaces. The "chroot" command is of course available in every Linux and has been the standard technique used by the Red Hat family distros to rescue their own unbootable Linux.

    The standard way to use chroot equivalent to Post #1 would be in a root console something like
    Code:
    mkdir /mnt/hdc3
    mount /dev/hdc3 /mnt/hdc3
    chroot /mnt/hdc3
    At this point the terminal is actually inside the Linux residing in /dev/hdc3 and so the command "startx" if accepted without error will fire up its desktop.

    When a user finishes with working on the Linux inside /dev/hdc3 the "exit" command will return him back to the orginal Linux.

    The above is not an discouragement to the OP but just adding a different angle possibly on the same subject.
    Last edited by saikee; 03-04-2009 at 09:36 AM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  5. #5
    Join Date
    Oct 2002
    Location
    Binghamton NY
    Posts
    2,435
    But this isn't really chroot, is it?

    Like "home", "root" is one of those words with more than one meaning. There are two different kind of "home" in a linux filesystem

    [/home ] and [ ~ ]

    likewise, there are different kinds of "root" in a linux filesystem.

    [ / ] and [/root]

    [ / ] represents the directory that contains all files. If memory serves, chroot redifines this kind of root.

    [ /root ] represents the home directory of the root user. It's almost never used, but the Slax live CD runs as root, and so, to make it even more confusing in this case:

    [/root] = [ ~ ]

    and

    /root = /home

    Confusing, isn't it? Let's start over.

    What my command

    #mount /dev/hdc3 /root

    accomplishes is simply what the fstab does whenever [ /home ] (the directory containing all normal account data) is mounted as a seperate partition from [ / ] in a normal install.
    Here's an example of fstab from an old kubuntu system.
    Code:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    # /dev/sda1
    UUID=f5218054-8cbb-4323-aaf8-28d0188ba432 /               ext3    relatime,errors=remount-ro 0       1
    # /dev/sda3
    UUID=c432263e-33c3-4cbe-94c2-ca96e3e57120 /home          ext3    relatime        0       2
    # /dev/sda2
    UUID=100e56ff-3474-4b38-b1e6-1c6e99ddc4dc none            swap    sw              0       0
    /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0

    except that the Slax CD runs as root, so that changes the equation. Most live CDs don't run as root. For a knoppix cd, or sidux, or an ubuntu live cd, the command would be

    #mount /dev/hdc3 /home


    No, it's not dual booting, but it needs a name. I'd call it a "live root".
    Last edited by blackbelt_jones; 03-04-2009 at 02:29 PM.

  6. #6
    Join Date
    Oct 2002
    Location
    Binghamton NY
    Posts
    2,435
    Well, according to the guys in the irc chat, running as root is still very dangerous, even with a live CD, so I guess that's the fly in the ointment I was expecting.

    However, it's pretty easy to run a Slax live CD as the root file system as a normal user. First, I log on to Slax in text mode, and then:


    I get out of the way of my changes
    #cd /

    I mount the hard drive as /home (not /root)
    #mount /dev/hdc2 /home

    I add a normal user.
    #adduser

    I change the root password
    #passwd root


    I log off as root
    #exit

    and then I log back on as normal user!
    Last edited by blackbelt_jones; 03-04-2009 at 08:08 PM.

  7. #7
    Join Date
    Sep 2000
    Location
    N California
    Posts
    953
    Are you saying that the Slack Live CD bots to and leaves you as "root"?

    All Live CDs I've played with have always created a user account to use. The user needs to sudo to root to get privileges.

    If this is true them the /home location would have a directory present after boot. (user home)

    Is your hard disk the "home" file system or just your individual user's home directory?

    A possible scenario...

    You could mount the disk drive to /mnt
    add user "user2"
    remove the directory /home/user2
    create a link in /home called user2 pointing to user2's home directory on the hard disk.
    login as user2. (not sure you can get a log in screen in a LiveCD)

  8. #8
    Join Date
    Oct 2002
    Location
    Binghamton NY
    Posts
    2,435
    Quote Originally Posted by teeitup View Post
    Are you saying that the Slack Live CD bots to and leaves you as "root"?

    All Live CDs I've played with have always created a user account to use. The user needs to sudo to root to get privileges.

    If this is true them the /home location would have a directory present after boot. (user home)

    Is your hard disk the "home" file system or just your individual user's home directory?

    A possible scenario...

    You could mount the disk drive to /mnt
    add user "user2"
    remove the directory /home/user2
    create a link in /home called user2 pointing to user2's home directory on the hard disk.
    login as user2. (not sure you can get a log in screen in a LiveCD)
    Well, yes that's what I'm saying. I'm still not convinced it's as dangerous as all that, or we'd be hearing horror stories. I mean, it seems to me that you're still better off than running Windows XP as the default setup goes, because you're essentially running as root, and your system is writable. However, when psych-major and I disagree about something. I'm usually wrong, so I'm not going to be running Slax as root any more, and I'm not going to suggest it to anyone else.

    So note that what I'm doing now is different from what I was doing at the beginning of the thread, where I was letting Slax run as root, and using /root for my mount point.


    Here's how it works, and it's the same in every Linux system I've ever seen: Every Linux root directory ( / ) contains what I shall call a "master home" directory. (/home) distinct from the individual home user directories ( ~ ) that reside withing.

    If the there's no separate partition assigned to /home, that directory contains the individual user directory. If there is a seperate partition for /home, fstab uses the directory in root as a mount point for that parition.

    All I do is exactly what fstab would have done. I use preexisting [ /home ] directory in [ / ] as the mount point for the parition.

    mount /dev/hdc1 /home

    I do it before I create a normal user with the adduser command, so that user's directory and information go to the right place.

    Running as root may be dangerous for Slax, but it also reflects typical Slackware simplicity. As a result, there's no special trick to fixing Slax to run as a normal user. All the commands involved are the usual Unix-Linux commands. "adduser", "passwd root", and so on.

    At the mention of symbolic links, my brain turns to a pound of cold pot roast. Why would I need to do all that? I have created a normal user and put his account on the hard drive where it can be accessed on the next boot. It's running just like an installed system would run. I'll admit that I didn't look very hard at what you proposed, but have I not already solved the problem?

  9. #9
    Join Date
    Oct 2002
    Location
    Binghamton NY
    Posts
    2,435
    The slax disk gives you a lengthy list of boot options, and one of them is to boot in text mode. That's where i go to do all this before starting up You don't get a "login screen", just a text prompt. Same thing, just uglier.

  10. #10
    Join Date
    Oct 2002
    Location
    Binghamton NY
    Posts
    2,435
    So this isn't quite as great as I thought, but it's pretty great. I envisioned a really really easy way, and Shangri-La to run linux, using root with impunity so that permission and passwords disappear, and slawckware packages can be plucked from the trees. Your grandma and your great-grandma could use it. The millenium of the Linux Desktop would have finally arrived. Well, no, not really, but live-rooting looks like a nice way to play with Live CDs, establishing a normal user account and automtaically saving configuration and normal user data. Imagine being able to switch desktop systems as if you were sliding an album into a CD player, or changing the DVD in the player for your TV, while keeping your main desktop system intact. What I would like to see are custom desktops designed around specific tasks or sets of tasks, a sometime alternative to cramming everything together on the desktop. Anyway, this whole concept needs to be tested.

  11. #11
    Join Date
    Jan 2003
    Location
    Denver, Colorado
    Posts
    1,488
    How fascinating that your live CD ended up being Slackware based...
    Last edited by psych-major; 03-09-2009 at 05:10 PM.
    Slackware current (Dell Latitude D610)
    CentOS 5.2 (Servers)
    Registered Linux User # 375030

  12. #12
    Join Date
    Oct 2002
    Location
    Binghamton NY
    Posts
    2,435
    Quote Originally Posted by psych-major View Post
    How fascinating that your live CD ended up being Slackware based...
    Goddamn it, I just spent an hour replying to this, and the site lost it by asking me to log in a second time and then telling me I had already logged in so please click back, and so IO clicked back and found nothing.

  13. #13
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,947
    I've had that when using an untrusted computer, and I had the "remember me" box (on the login page) unchecked, so the browser wouldn't store my credentials in a cookie. Of course that also meant that if I spent too long replying to a message, without hitting some forum page in the meantime (tip: open the thread you're replying to in another tab ), then my temporary session cookie would expire, and I'd have to log in again.

    If you do trust your local machine, and you have the "remember me" box turned off, so you're logging in every time you visit the site, it might help to try checking it. Your decision, though (there might be ways that other sites could use this credentials cookie to do things as you on this site; depends on how well this site's code defends against that kind of thing).

  14. #14
    Join Date
    Dec 1999
    Location
    tx
    Posts
    1,190

    Some Live CD's write to HD swap!!!

    >>A live CD is really and truly read-only.

    A lot of people think that. I suppose I will be called names, then banned here for disagreeing which is what happened to me on the Mepis forum when I reported what had happened when I ran Mepis 7.0 live.

    My Vostro 1000 had worked great on hibernate, and I loved it. One day it stopped hibernating, and I finally discovered the swap partition UUID had been changed, which really screws things up.

    I tried fixing it per instructions I found. The usual UUID partition error, but also script files for hibernate. To this day, I still haven't got hibernate to work.

    I tried Mepis 7.0 again, hoping to see if it was as superior as Mepis fans say it is. I watched the scrolling as it booted up, and suddenly to my surprise it said plainly it was setting UUID swap. I got only the first digit, and when I shut down and went back to Kubuntu 7.04, yep, it was changed again.

    I realized then that it probably lost hibernate the first time I tried Mepis 7.0 some weeks earlier and that is when hibernate broke.

    I have tried to find the place in the boot software it could have written to swap UUID, but have had no luck. I guarantee you it is there in a binary or script file. It didn't just change swap UUID for fun. Under some unknown conditions, Mepis 7.0 decides swap UUID is wrong or non-existent and sets it again. Even if it is something wrong with my machine, the ability to check and set UUID is in the program somewhere or it could have never happened.

    I can't even find where my older computer loaded drivers and stuff on a scroll a few years ago when one day it stopped booting, and I was able to fix a freeze with Puppy by finding and remarking the script file that did it. (I dug out my notebooks now that I am back in Mexico, and put them in sight so I can remember to find out where that was.) I have asked for help, and no one seems to understand what I mean which may well mean I don't know enough to properly describe it.

    When I asked for help on Mepis forums, I was called names, and then a smart-aleck from NZ sent me an e-mail, apparently trying to be nice to the fool who said Mepis wrote to his HD and see if there were some way I could redeem myself. He told me I had been banned, which is fair, because after that treatment, I will make sure anyone who thinks about Mepis is warned that is another distro to avoid for surly forums. (Also Knoppix and Mandrivausers.)

    You can say it's only writing to swap, so it doesn't matter, but in my case that was enough to destroy a convenient hibernate function which means it is important.

    I have tried it several more times, and never again has it changed UUID for swap.

  15. #15
    Join Date
    Oct 2002
    Posts
    547

    Swap uuid

    $whatis microsoft
    microsoft: nothing appropriate

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •