SM Linux Folding Drive Image Pt2

EnverexEnverex Worcester, UK Icrontian
edited October 2006 in Science & Tech
Started a new thread because I don't seem to have access to view my old one anymore...

Anyway, I've been working on it all day and I managed to get the disk usage of the OS down to 470MB, even better is that the image of the disk compresses down to 174MB which makes the download considerably less painful. I'm just sorting out a few more things at the moment to make sure it works happily and then I should be able to put it up for testing.
«1

Comments

  • QCHQCH Ancient Guru Chicago Area - USA Icrontian
    edited October 2006
    Cool.... I am eager to try it out!!! Thanks for the effort Enverex!! :thumbsup:
  • KwitkoKwitko Sheriff of Banning (Retired) By the thing near the stuff Icrontian
    edited October 2006
    I'm all for it, Enverex. One question, will it run headless? Where I have SM4 in my apartment right now I can't reach even with a KVM, so it'd be great to SSH into the console.
  • EnverexEnverex Worcester, UK Icrontian
    edited October 2006
    KwitCo™ wrote:
    I'm all for it, Enverex. One question, will it run headless? Where I have SM4 in my apartment right now I can't reach even with a KVM, so it'd be great to SSH into the console.

    Assuming it has a net connection and there is a DHCP server on the network (would kinda be pointless without, heh) yeah, it'll run headless fine.

    Just trying to find the best way to image it still.
  • EnverexEnverex Worcester, UK Icrontian
    edited October 2006
    Ok, running into issues here, the super-old drive I'm using started making weird noises when I reached certain areas and it seems to have lots of bad blocks so I need to map these out then I can carry on.

    One question: Does anyone think this is going to be imaged on to any drives SMALLER than 4GB?
  • KwitkoKwitko Sheriff of Banning (Retired) By the thing near the stuff Icrontian
    edited October 2006
    Enverex wrote:
    One question: Does anyone think this is going to be imaged on to any drives SMALLER than 4GB?

    SM4's drive is 1.6GB.
  • EnverexEnverex Worcester, UK Icrontian
    edited October 2006
    Ok, I'll go about this a different way then (when imaging the drive, even though it was only a 1GB partition and the rest was unpartitioned, it's still an image of the ENTIRE drive, so it required a 4GB drive minimum to write back to, but I'm going to use VM to make a 1GB drive and do that).
  • QCHQCH Ancient Guru Chicago Area - USA Icrontian
    edited October 2006
    I think the SMx project will be getting a ton of 6GB droves soon. We can start dishing them out so that all the PC's with less than 4 can run your image.
  • KwitkoKwitko Sheriff of Banning (Retired) By the thing near the stuff Icrontian
    edited October 2006
    Enverex wrote:
    Ok, I'll go about this a different way then (when imaging the drive, even though it was only a 1GB partition and the rest was unpartitioned, it's still an image of the ENTIRE drive, so it required a 4GB drive minimum to write back to, but I'm going to use VM to make a 1GB drive and do that).

    Don't worry too much about it, I've got a spare 10GB drive I can use. If it's easier to image it as a 4GB drive, go ahead.
  • EnverexEnverex Worcester, UK Icrontian
    edited October 2006
    No no, in those immortal words of Mastermind. "I've started so I'll finish" :p
    I hate having it force a 4GB drive for 1GB of data anyway.
  • KwitkoKwitko Sheriff of Banning (Retired) By the thing near the stuff Icrontian
    edited October 2006
    Solid!
  • EnverexEnverex Worcester, UK Icrontian
    edited October 2006
    Down to 414MB and booting happily (and very speedily I may add, even with every SCSI controller driver shouting "what u doin fool!". I think I have an idea for imaging now too...
  • EnverexEnverex Worcester, UK Icrontian
    edited October 2006
    Ok, I should have an image uploaded within an hour... erm, or not as prime didn't give me any details, erm, ok I'll put it on my server and PM me if you want details for it.

    Anyways, here's a screenshot of the customised bootloader. I managed to get around the "what if it's SCSI? What if it's on the secondary controller!?" problem by putting them all as options. After the first boot (or after unimaging even) you can set the default via the grub file which I'll put in the documentation. But this lets you boot it without being able to modify it first regardless of where it is.
  • primesuspectprimesuspect Beepin n' Boopin Detroit, MI Icrontian
    edited October 2006
    give me a link, I'll DL it and then put it on the server. You used to have a folder on the SM server, do you still have access to it?
  • EnverexEnverex Worcester, UK Icrontian
    edited October 2006
    im gonna make this brief before i snap. I just typed out a long post but lost it because im using some crappy text mode browser on a livecd. anywyay, something went horribly wrong trying to image things and change locations, mounting etc and now my entire pc is hosed so im probably going to be down for a while

    no backups because of no-where to back them up to :( .
  • KwitkoKwitko Sheriff of Banning (Retired) By the thing near the stuff Icrontian
    edited October 2006
    Son of a diddily...

    That sucks, Env. I know that feeling. Hope you're back up and running soon.
  • EnverexEnverex Worcester, UK Icrontian
    edited October 2006
    Ok, I've backed up the entire drive to another drive I have that I utterly forgot about (an old 160GB SATA), formatted with a new filesystem (Reiser4 this time) and copied back. Most things weren't working but it somehow still booted to a desktop sans a few... things. Then after an hour or so everything started working, which is amazing considering how much was corrupt... so yeah, not sure what's going on. Gonna see if I can salvage what is left of the project now...
  • LeonardoLeonardo Wake up and smell the glaciers Eagle River, Alaska Icrontian
    edited October 2006
    Thanks for your efforts on this.
  • EnverexEnverex Worcester, UK Icrontian
    edited October 2006
    Down to 376M uncompressed and fiddling with the final stages now. It's like this is cursed, I've had to restart my PC so many times from almost hard-locks and issues around it (not the mini-distro, just the programs I'm using to make it).

    Hopefully will be up tonight.
  • GHoosdumGHoosdum Icrontian
    edited October 2006
    This is a great effort, Enverex. It's surely going to be a huge help to the team.
  • EnverexEnverex Worcester, UK Icrontian
    edited October 2006
    Ok, I've given up on making an image because there are simply too many issues, too many things to go wrong and any other ways would require proprietory software like Norton Ghost which I want to avoid, so I'm going to do it a slightly manual way, but documnent it so it should be easy to do anyway.

    The contents of the drive when compressed with a basic bzip2 come to a huge 129.2MB, so the download isn't very painful.
    give me a link, I'll DL it and then put it on the server. You used to have a folder on the SM server, do you still have access to it?

    No idea what the login details were (or address, etc).
  • EnverexEnverex Worcester, UK Icrontian
    edited October 2006
    I'll post the instructions now so that people can comment on them if they don't make any sense or need fixing, etc. Despite the fact that it looks like a load of things, it's just a few very small quick things and shouldn't take more than a few minutes (no really).
    Installation Process:
    IMPORTANT -- If the drive you want to write this onto is IDE then it will be either 'hda' (Primary Master) or 'hdc' (Secondary Master). If it is SCSI or SATA then it will be 'sda'. Replace every instance of 'XdX' in this guide with the real drive code (hda, hdc, sda, etc). There are exceptions but it is rare. Ask if you are unsure. Anything with a '#' infront of it means that you should type it into the terminal. If you insist on doing this on a machine with other hard-drives present then you MUST make sure that the drive you will be using for this is classed as the first hard-drive in the machine.

    First copy the archive (do not uncompress it) to some location that you will still be able to access after booting Linux (a CD, flash media or something). Remove all hard-drives and solid state media from your PC (this is just to make sure you don't go wiping the wrong drive).

    Boot your favorite Linux LiveCD (Knoppix, Gentoo LiveCD, Ubuntu CD, etc but make sure it's one that lets you remove the disc after booting unless you have 2 optical drives or have archive on something other than a CD).

    Bring up a terminal (xterm, Konsole, etc) window (however that is done for the Linux boot you're using, it's normally on a menu) and run:
    # fdisk /dev/XdX
    Delete all the partitions with the 'd' key. When this is done simply press 'w' then enter.

    Now that the drive is clear it is time to format it. Type;
    # mkfs.reiserfs -l SMX -f /dev/XdX

    Reiser will now ask you if this is ok and choose yes. The drive should now be formatted and read to be used. Next, type;
    # mkdir /mnt/smx
    # mount /dev/XdX /mnt/smx

    The drive should now be mounted and working. Now type the following which should extract the SMX machine files to your drive. This is going to take a little while but hopefully not too long, depends on where you have the archive stored and the drive you're copying to.
    # cd /mnt/smx
    # tar xvjpf /path/to/whateverthehell/youputthearchive



    Now for the last stage. Type the following after the archive has successfully extracted;
    # chroot /mnt/smx /bin/bash
    # source /etc/profile; env-update
    # mount -t proc proc proc
    # grub


    This should present you with a new screen. Simply enter the following:
    # root (hd0)
    # setup (hd0)
    # quit


    And now it should be setup. Now type the following to exit the chroot and reboot.
    # exit
    # init 6


    The drive should now be ready. Congratulations.


    Post Install Instructions:
    Things that need to be changed to make the machine unique are...

    # nano -w /etc/conf.d/hostname --- Edit this file to give the correct name of the machine.
    # nano -w /etc/hosts --- Edit the line of this to match the name you gave in the hostname file.
    # nano -w /boot/grub/menu.lst --- Edit this file to set the timeout of the bootloader and to also set the default to something else if needed (2 is hda, 3 is hdc, 4 is sda).
    # passwd --- to change the root password for the machine.
    # /opt/foldingathome/initfolding --- Run this to configure F@H.
    # /etc/init.d/foldingathome start --- Execute this to run F@H
    # rc-update add foldingathome default --- and then finally this to tell F@H to start on boot.
  • EnverexEnverex Worcester, UK Icrontian
    edited October 2006
    Ok, the beta is ready.

    Give me a shout if anyone wants to try it. I tested it on one of my SATA drives and it worked fine using my instructions above (took about 3 minutes, heh).
  • EnverexEnverex Worcester, UK Icrontian
    edited October 2006
    Updated the project. I've updated the kernel, added some more support for boot-drives and it now loads needed SCSI/SATA controlers only if they are needed saving some more RAM.

    Prof should be interested that I've patched the kernel to use the BAD-RAM ability which means you can now use this on machines with defective RAM modules. I'll document this later if anyone is interested. The compressed archive is now down to 112MB with the entire extracted OS footprint being only 356MB.

    No bites though, has everyone lost interest entirely? :(
  • primesuspectprimesuspect Beepin n' Boopin Detroit, MI Icrontian
    edited October 2006
    I asked for a link before, so I can put it on the server. :D
  • EnverexEnverex Worcester, UK Icrontian
    edited October 2006
    I asked for a link before, so I can put it on the server. :D

    I could swear I sent you a PM with the link... ok.. where the hell did I send it? lol
  • KwitkoKwitko Sheriff of Banning (Retired) By the thing near the stuff Icrontian
    edited October 2006
    Dude, sweet! I'm ready to give this a shot. I'll probably load it over the weekend.
  • QCHQCH Ancient Guru Chicago Area - USA Icrontian
    edited October 2006
    I have a "special" Pc to try this on....
  • primesuspectprimesuspect Beepin n' Boopin Detroit, MI Icrontian
    edited October 2006
  • GHoosdumGHoosdum Icrontian
    edited October 2006
    This really sounds like a pretty awesome tool.
  • EnverexEnverex Worcester, UK Icrontian
    edited October 2006
    If anyone wants/needs support for anything else in it (or has a query about something it supports) please post and ask.
Sign In or Register to comment.