I need volunteers for a dangerous mission!

I've migrated two Arch boxes, manually, from devfs to regular static /dev.  I decided to write a script to automate the process.
This thing is dangerous.  I have yet to test it on any of my own boxen, so I'm looking for people who
1) Want to move to static /dev from devfs (obviously)
2) Don't mind reinstalling if my script borks their machines
3) Like giving feedback
The tarball is here.  Untar it, cd into the directory, and run ihatedevfs from that directory.  You must be in that directory when you run it.  Also, being root helps 
Also, obviously, you must have built a kernel with devfs disabled that you're ready to boot into.
Here's the code just for anyone who wants to see something scary  :twisted:
ihatedevfs:
#!/bin/sh
# ihatedevfs - Michael Baehr <[email protected]>
# Usage: Run this on any arch linux system (as root) and you will find the infernal devfs
# replaced with a real man's /dev, and the necessary changes to various sytem files made so
# that you can actually use your system afterwards.
# This is a hack. I am not responsible for any loss of data, computer, life, pets, or sanity
# that may result from usage of this shell script.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
STARTDIR=`pwd`
if [ $UID -ne 0 ]; then
echo "You must be root before I let you fuck up your system irreparably."
# Damn straight
exit
fi
FSTAB=/etc/fstab
MENU_LST=/boot/grub/menu.lst
MAKEDEV=$STARTDIR/MAKEDEV-1.7
SNDDEVICES=$STARTDIR/snddevices
DEVTOOL=$STARTDIR/iloveflatdev
INITTAB=/etc/inittab
SECURETTY=/etc/securetty
GROUP=/etc/group
NEWDEV=/mnt/temporary/dev
add_groups()
echo audio::420:root >> $GROUP
echo floppy::421:root >> $GROUP
echo dialout::422:root >> $GROUP
remount()
if [ ! -e /mnt/temporary ]; then
mkdir /mnt/temporary
fi
i=`mount | grep "on / " | sed s: .*on.*::`
# Get the current root partition and remount it at /mnt/temporary
mount $i /mnt/temporary
# Copy our scripts into the chroot, just in case
# we're on a different partition (home?)
cp $MAKEDEV /mnt/temporary/dev/
cp $SNDDEVICES /mnt/temporary/dev/
cp $DEVTOOL /mnt/temporary/dev/
find_corresponding_node()
i="$(file $1 | awk '{print $4}' | sed -e 's?/?\/?')"
# Find major/minor numbers for this devfs node
for j in "$(file $NEWDEV/* | grep $i | sed -e s/:.*//)"; do
# Find the corresponding node in our new /dev directory
echo $j | awk '{print $1}' | sed s:/mnt/temporary::g
# We only want the first, so break out
break
done
update_fstab()
for i in $(grep ^/dev $FSTAB | sed s/ .*//); do
file $i | grep cannot >& /dev/null
if [ ! $? -gt 0 ]; then
# Node doesn't exist, don't replace it in fstab
continue
fi
j=`find_corresponding_node $i`
echo $j
sed -i s:$i:$j: $FSTAB
done
update_menu_lst()
for i in $(grep root= $MENU_LST | sed -e s/.*root=// -e s/ ro//); do
j=`find_corresponding_node $i`
sed -i s:$i:$j: $MENU_LST
done
update_ttys()
sed -i s:vc/:tty:g $INITTAB
sed -i s:vc/:tty:g $SECURETTY
cleanup()
cd $STARTDIR
umount /mnt/temporary
rm -r /mnt/temporary
add_groups
remount
# We need to chroot in order to create the device nodes,
# as one of the scripts, (snddevices), is stupid
chroot /mnt/temporary /dev/iloveflatdev
rm /mnt/temporary/dev/iloveflatdev
# We don't need this script cluttering up /dev, now do we? Nah.
update_fstab
update_menu_lst
update_ttys
cleanup
# Done. Pray.
iloveflatdev
#!/bin/sh
# We use two scripts to populate /dev. One of them is MAKEDEV
# which comes our way via Linux from Scratch, and the other one
# is snddevices, from alsa-driver.
# Both of them want a few groups to exist that aren't part of Arch's
# default setup, so we create them first
cd /dev
./MAKEDEV-1.7 generic
./snddevices
rm MAKEDEV-1.7
rm snddevices
mkdir pts
mkdir shm
# Boh.
:idea:    8)  :?  :!:
Thank you guinea pig Itachi for pointing out my first fatal, system-borking bug! ( /me updates the script, heh )
Edit2: And second bug.    :twisted:
Both fixed, don't worry.  Oh, and his sytem booted fine

You're too kind.
Edit: Current things I need to fix:
1) Doesn't fix /etc/conf.d/gpm and /etc/X11/XF86Config to point to the new pointer devices (/dev/psaux instead of /dev/misc/psaux)
2) Doesn't distinguish between block and character devices, which seems to be a problem with cdroms

Similar Messages

  • OT: U.S. Midwest flood relief project needs volunteers

    Greetings everybody,
    I discovered this organization recently, Hands On Disaster
    Response
    http://www.hodr.org). They provide
    opportunities for short-term volunteer
    work in disaster locations, with what appears to be very
    little red tape. I
    haven't been on a project yet, but got on their email list,
    and they just
    sent me this letter (below), which I thought some people here
    might be
    interested in.
    Patty Ayers | www.WebDevBiz.com
    Free Articles on the Business of Web Development
    Web Design Contract, Estimate Request Form, Estimate
    Worksheet
    The Midwestern United States have been inundated by record
    breaking flooding
    creating a great need for volunteer support. Hands On has
    launched Project
    Cedar Rapids which opened June 23 and will run for 30 days,
    providing
    volunteer assistance to communities affected by the flooding.
    We need volunteers to come join our project! If you cannot
    come and join our
    team in Iowa, then please consider donating to support these
    efforts and the
    people of IOWA! You can make a donation that you know will be
    used
    effectively through the Please Give page on our website or
    through PayPal.
    Please also check the Volunteer Info section of our website
    and photos for
    updated information as it becomes available.
    We will be focusing our efforts in Cedar Rapids and Palo, IA.
    In Palo, a
    town of 500 homes, 470 were flooded. In Cedar Rapids, Iowa's
    second largest
    city, an estimated 4,000 homes were inundated by the
    overflowing river.
    Residents are very proactive and have already started
    removing the
    water-logged contents of their homes, lining the streets with
    debris. We
    anticipate working alongside residents, helping with gutting
    of homes, and
    will remain open and flexible to the changing needs of the
    communities.
    We will update our website
    http://www.hodr.org/ and our
    Twitter micro-blog
    http://twitter.com/HODRops
    with updates and projects as they evolve.
    See you in Iowa!
    Bill Driscoll Jr.
    Operations Director
    Hands On Disaster Response
    Project Cedar Rapids

  • HELP! volunteers for usability of Adobe Acrobat Standard wanted

    Hi!
    I am MSc IT Management student in a UK University, and I need volunteers to answer 32 questions on usability of Adobe Acrobat Standard. Could you, please, help?- I'm trying to get good marks for my assignment... Questions are not difficult at all, the purpose of the questionnaire is to assess usability of the piece of software. I promise to treat your data strictly private and never disclose your email addresses or anything. If anyone interested I can share results with you.
    If you can help, please send an email before 20.04.08 to me (irina.pertsel#AT#sunderland.ac.uk - change #AT# to @) with the subject "Adobe usability help". Please indicate if you are a student or an academic or someone else, how many years experience you have with Adobe Acrobat Standard and the purpose you use it for. THANK YOU very, very much indeed!
    PS Questions include new features such as commenting

    Hi,
    No way to know that.You must contact your customer service ,give all you serials,deactivate the machine where the soft was installed,they will tell you which serial was on it.
    Regards

  • Need Suggestion for Archival of a Table Data

    Hi guys,
    I want to archive one of my large table. the structure of table is as below.
    Daily there will be around 40000 rows inserted into the table.
    Need suggestion for the same. will the partitioning help and on what basis?
    CREATE TABLE IM_JMS_MESSAGES_CLOB_IN
    LOAN_NUMBER VARCHAR2(10 BYTE),
    LOAN_XML CLOB,
    LOAN_UPDATE_DT TIMESTAMP(6),
    JMS_TIMESTAMP TIMESTAMP(6),
    INSERT_DT TIMESTAMP(6)
    TABLESPACE DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 1M
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    LOB (LOAN_XML) STORE AS
    ( TABLESPACE DATA
    ENABLE STORAGE IN ROW
    CHUNK 8192
    PCTVERSION 10
    NOCACHE
    STORAGE (
    INITIAL 1M
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOCACHE
    NOPARALLEL;
    do the needful.
    regards,
    Sandeep

    There will not be any updates /deletes on the table.
    I have created a partitioned table with same struture and i am inserting the records from my original table to this partitioned table where i will maintain data for 6 months.
    After loading the data from original table to archived table i will truncating the original table.
    If my original table is partitioned then what about the restoring of the data??? how will restore the data of last month???

  • I have problem with buying in games , I got the massage that the purchased can not be completed , please contact iTunes support.. I need help for my case please

    I have problem with buying in games , I got the massage that the purchased can not be completed , please contact iTunes support.. I need help for my case please

    http://www.apple.com/support/itunes/contact/

  • I am locked out of my iPad, I can't back it up because it won't connect to iTunes (because it's locked with a password) and I need it for school, it has all of my school work on it and the school doesn't have or passwords. PLEASE HELP ME!!!

    I am locked out of my iPad 2, I can't back it up because it won't connect to iTunes (because it's locked with a password) and I need it for school, it has all of my school work on it and the school doesn't have or passwords. I can't loose all of my work. PLEASE HELP ME!!!

    Hi ebby,
    Here are the instructions for a disabled device - hopefully you have sync'd with your computer before now?
    http://support.apple.com/kb/HT1212
    Good luck!
    Cheers,
    GB

  • Can anyone recommend a portable USB 3.0 drive with hardware encryption, compatible with OSX and Windows 7.  I need it for my MacBook Pro 13", 2012, running Mountain Lion

    Can anyone recommend a portable USB 3.0 drive with hardware encryption, compatible with OSX Mountain Lion and Windows 7.  I need it for my MacBook Pro 13”, 2012, running Mountain Lion & Windows 7 Ultimate - BootCamp.  I’ve heard that the Buffalo MiniStation Encryption does not work with OSX, is that true..?  I'd like it to work with both operating systems, using the built in hardware encryption.  Thanks

    This article may help: A flashing question mark appears when you start your Mac.

  • I have a mixer which i was using with my pc and now i bought a new macbook and it have only one jack for headphones and to use mixers i need jack for microphone too so what should i do

    i have a mixer which i was using with my pc and now i bought a new macbook and it have only one jack for headphones and to use mixers i need jack for microphone too so what should i do

    You need to get headset splitter adapter.
    http://www.startech.com/Cables/Audio-Video/Audio-Cables/35mm-4-Position-to-2x-3- Position-35mm-Headset-Splitter-Adapter-Male-to-Female~MUYHSMFF

  • I just purchased Time Capsule today.  I ONLY want to use it as an external drive.  I do not need it for Time Machine. I can see the TC in my finder, but when I click on a file or video to drag and drop, I get message that TC can't be modified. Help please

    I just purchased Time Capsule today.  I ONLY want to use it as an external drive.  I do not need it for Time Machine. I need to free up room on my computer. As of now, I can't even load updates. I can see the TC in my finder, but when I click on a file or video to drag and drop, I get message that TC can't be modified. Help please!

    I agree with Kappy.. passing files and especially via wireless is slow as slow.
    Just need to be sure your TC is the new AC model??
    And the OS on the computer is Lion?
    Have you completed the setup of the TC via the utility? You do still need to get internet via the TC so it has to be plugged into the main router..
    Give us the full picture of the network.
    Then we can help you get into it.. whether you should put your files on it is another question.

  • I need driver for ati switchable graphics 4250/6370 on windows 8

    The video driver in HP is only for windows 7, and in the Ati webpage is only for one graphics card and not for switchable mode  under windows 8, please i need drivers for the hp dv7 4267cl model.
    i have three notebook of this model for software developers, i need update. any suggestion?
    Graphics card: ATI 4250 / 6370 switchable
    Notebook model: DV7 4267cl

    Hello HK_Ariel,
    Thank you for posting on the HP Forums!
    I understand you are looking for a WIndows 8 ATI driver for your computer. This driver does not exist, as you indicated. You would need to return the computer to Windows 7 to use the switchable graphics.
    Mario
    I worked on behalf of HP.

  • *UPDATED 7/15/04* Complete guide to bioses, drivers, and needed files for the MSI K8N Neo Platinum

    Complete newbie's guide to bioses, drivers, and needed files for the MSI K8N Neo Platinum:
    Last Updated: Thursday July 15th, 2004
    Bioses:
    (In order of date released.)
    1.1b3 - (Download)
    - Pre-1.1, given to reviewers to use in their reviews and benchmarks.
    - Less stable, but supposedly you get slightly better overclocks.
    1.1 Official - (Download)
    1. This is AWARD BIOS release
    2. This BIOS fixes the following problems of the previous version:
    - Memory always run DDR 200 when install single side DDR on DIMM2 & DIMM3.
    - Windows 2000 can't format the RAID IDE HDD when plug in Promise 378 controller.
    1.2b5 - (Download)
    1.2b7 - (No Download Yet)
    1.2b10 - (Download)
    - First attempt to fix false temperature readings. Fixes it for some people with Newcastle cores and doesn't fix it for anybody with Clawhammer cores.
    1.2b12 - (Download)
    - Second attempt to fix false temperature readings. Fixes it for some people with Newcastle cores and some people with Clawhammer cores.
    1.3b1 - (Download)
    - Another attempt to fix temperature problems?
    - Possibly fixes cold boot/power light issues?
    1.2 Official - (Download)
    1. This is AWARD BIOS release
    2. This BIOS fixes the following problems of the previous version:
    - System can't resume from S3 sometimes when install USB device.
    - Support K8 Sempron CPU.
    - Turn off keyboard LED in S3.
    --Quick Guide for flashing BIOS, provided by MSI--
    1. Create a MS-DOS boot diskette, then copy the the .exe and the bios file to the floppy disk. Both of these files can be found in the package you downloaded.
    2. Press "Delete" and go to BIOS setup while computer bootup.
    Check BIOS advanced features and see if BIOS flash write control is enabled
    (This option must be enabled. If you can not find this setting, it means the BIOS can be
    flashed.)
    3. Boot from MS-DOS boot diskette and get a:\> prompt.
    4. Type "", then press ENTER
    5. The flash program will then ask "Do you want to save BIOS?", please press "N" for no. The when you see Press 'Y' to program or 'N' to Exit, please press "Y" to continue.
    6. After flashing complete, remove floppy and reset the system .
    7. Press DELETE or F1 when prompted at first reboot after flashing.
    8. Load BIOS optimized defaults, then save settings and exits.
    Drivers & Needed Files:
    (Note: All these drivers are for Windows XP.)
    Leaked Nvidia nForce3 Chipset Drivers Version 4.40
    (Please use at your own risk, these are LEAKED drivers. Password for the .zip file is "ocworkbench rules". Also, you will need to rename the WinXP_2K folder in IDE to either WinXP or Win2K else the installer doesn't pick it up.) Thanks for the link Wonkanoby!
    *NEW* Leaked Nvidia nForce3 Chipset Drivers Version 5.03
    More leaked drivers? Seems some parts of the drivers are older and some are newer.
    1. Windows XP Service Pack 1A (Web Install) -or- Windows XP Service Pack 1A (Full Install)
    2. Microsoft DirectX 9.0b (Web Install) -or- Microsoft DirectX 9.0b (Full Install)
    3. Nvidia nForce3 Chipset Drivers Version 4.24
    4. AMD Athlon 64 Processor Driver Version 1.1.0.14
    5. Nvidia Video Card Driver Version 56.72 -or- Omega Nvidia Video Card Driver Version v1.5303
    (The Omega drivers are third party drivers optimized for gaming, most prefer these over the standard Nvidia drivers.)
    5. ATI Video Card Driver Version 4.7 -or- Omega ATI Video Card Driver Version 2.5.51
    (The Omega drivers are third party drivers optimized for gaming, most prefer these over the standard ATI drivers.)
    6. Onboard Sound Driver (Realtek AC'97 Audio Codec) Version A3.61
    It is HIGHLY reccomended that you install the drivers/needed files in the order listed above. Please note that there are two #5's because you either install one or the other depending on your video card, do not install both of them.
    You will come across a problem here though. You can't install the chipset drivers without installing the Windows service pack and DirectX first, but the Windows service pack and DirectX installs need the internet to download files and you won't have working internet until you install the chipset drivers. Here's what I did to get around this. Instead of downloading the web install versions of Windows service pack and DirectX, download the full version and and put them along with all the other drivers on a backup hard drive or burn them to a CD, this way you will have all the drivers you need when it's time to install them and none of them will require the internet to download files.
    Another note when installing drivers. Apparently the Nvidia chipset drivers also come with drivers for the onboard sound, but people seem to agree that the Realtek onboard sound drivers are better. When you are installing the Nvidia chipset drivers, just be sure to uncheck the box for sound drivers when it asks you which drivers you would like to install. Now you can safely install the Realtek drivers without any chance of conflicting sound drivers. Thanks for the tip Wonkanoby!

    Quote
    Originally posted by RLiu818
    Quote
    Originally posted by Deviation56
    Quote
    Originally posted by RLiu818
    You CAN install the nforce drivers BEFORE installing SP1.  The only requirement to install the nforce drivers is DX9.
    So is SP1 still recommended to install before the nforce drivers?
    The installer still reccomends to install it beforehand for full USB 2.0 functionality... I would have put what you said in there but I wanted to keep it as simple as possible.  
    oh.  IIRC the installer just says USB 2.0 will be fully functional after SP1 is installed.  So after you install SP1 you go into device manager and u click update driver and it will auto search and update the driver.
    Simplicity-wise, i guess its pretty much equal.  It might take less preparation to just copy DX9 full onto a CD and install that first, then nforce driver, then right away you have yoru internet connection.
    but i dunno.. i guess i will try it your way this time when my RMA"d board comes.
    i will be fomratting and doing a fresh install later on today and will let you know if i come across any problems

  • Need driver for canon mg 5250 as scanner is not working with version 10.7. Can you please help me to find the driver so scanner works with WIFI?

    need driver for canon mg 5250 as scanner is not working with version 10.7. Lion. Can you please help me to find the driver so scanner works with WIFI?

    Try with the latest Apple driver package for Canon (released 15th Feb):
    http://support.apple.com/kb/DL899
    This solved my problem with the printing.

  • If I want to put windows7 on my Mac,do I need software for a new comp. or a refurbished?

    If I want to put windows7 on my Mac,do I need software for a new comp. or a refurbished one?

    Mikestoyzz wrote:
    Looking on eBay,the software is labeled for new or refurbished.i'm putting it on through boot camp.
    With my limited knowledge, I don't think that it matters.

  • Need suggestion for designing a BEx report

    Hi,
    I need suggestions for designing a BEx report.
    Iu2019ve a DSO with below structure:
    1. Functional Location u2013 Key
    2. Maintenance Plan u2013 Key
    3. Maintenance Item u2013 Key
    4. Call # - Key
    5. Cycle u2013 Data Field
    6. Planned Date u2013 Data Field
    7. Completion Date u2013 Data Field
    This DSO contains data like:
    Functional -
    Plan --- Item -
    Call# --- Cycle -
    Planned Dt -
    Completion Dt
    Location
    11177 -
         134 -
         20 -
         1 -
    T1 -
         02-Jan-2011 -
         10-Jan-2011
    11177 -
         134 -
         20 -
         2 -
    T2 -
         15-Feb-2011 -
    11177 -
         134 -
         20 -
         3 -
    T1 -
         15-Mar-2011 -
    11177 -
         134 -
         20 -
         4 -
    M1 -
         30-Mar-2011 -
    25000 -
         170 -
         145 -
         1 -
    T1 -
         19-Jan-2011 -
         19-Jan-2011
    25000 -
         134 -
         145 -
         2 -
    T2 -
         20-Feb-2011 -
         25-Feb-2011
    25000 -
         134 -
         145 -
         3 -
    T1 -
         14-Mar-2011 -
    Now Iu2019ve to create a report which will be executed at the end of every month and should display the list of Functional Locations whose Cycles were planned in that particular month, along with the last completed Cycle/Date.
    Thus based upon above data, if I execute report at the end of (say) March then report must display:
    Functional ---     Curr. Cycle --- Planned Date --- Prev. completed Cycle --- Prev Completed Date
    Location
    11177 -
         T1 -
         15-Mar-2011 -
    ---     T1 -
    --     10-Jan-2011
    11177 -
         M1 -
         30-Mar-2011 -
    ---     T1 -
    --     10-Jan-2011
    25000 -
         T1 -
         14-Mar-2011 -
    ---     T2 -
    --     25-Feb-2011
    Any idea how can I display Previous Completed Cycle and Completion Date (i.e. the last two columns)?
    Regards,
    Vikrant.

    hi vikrant,
    You can a Cube at the reporting layer  which gets data from DSO and which has these 2 extra characteristics completion date and previous cycle along with other chars and keyfigures from DSO.
    You can populate these  based on your logic in the field routine.
    Hope it helps.
    Regards
    Dev

  • Does OS Lion need flip for mac

    new IMAC OS LIon 10.7.3  - can't seem to find out if it needs 'flip for mac'?

    Only if you wish to view .wmv files, otherwise it's not really needed.

Maybe you are looking for

  • How to find the number of occurance of a string in text field of Infopath form?

    Hi All, In Infopath text field, How to find the number of occurrence of a particular string in that field? Thanks in advance!

  • Getting oracle.xml.parser.v2.XMLParseException: Start Of root Element

    Hi All, I am getting below error while creating STUB/Skeleton in Jdeveloper to call a web service from OAF Page But getting below error while trying to creating Stub/Skeleton to call weservice ERROR: oracle.xml.parser.v2.XMLParseException: Start Of r

  • HOW DO  I GET MY SONGS BACK ON MY IPOD???

    I accidentally removed my 4th Gen photo ipod from my mac without properly unmounting it, and it went into "disk mode". It would n't allow me to get out of this mode, and itunes nor the finder would see the ipod when it was connected. Oddly enuff, pro

  • Include a jsp in another

    I wanr to include a jsp into another, but dinamically. I have a file named Inicio.jsp. This file has a link that calls the servlet "ServletMenu". This servlet decides which jsp page to load. But I want to load "inside" the Inicio.jsp. Here a send som

  • Starting Ink Tool in Word 2010

    I have a laptop computer but no tablet or pen with it.  I was wondering if I can use the Starting Ink tool with my mouse to edit/grade documents.  (I am a teacher at a high school.)  I cannot figure out how to make the ink write on my Word document.