-
I want /var/lib/mysql/foo to NOT be linked to /KNOPPIX!!!!
I have a database in /var/lib/mysql/ When I remaster and boot new CD, the file does not get copied to the ramdisk. It remains in the READONLY directory /KNOPPIX with only a link in the ramdisk. I have seen other posts asking for a solution to this but I have not seen any good solutions posted.
I have also noticed that some of the files under /var/ are not linked but are in fact copied over to the ramdisk. Who or what determines which files get copied over? Is it based on permissions, file ownership, wha that? Somebody please help. I have to have a bootable KNOPPIX cd with our mysql databases up and running by this weekend (3/12/05.)
I have read that moving them to /home/ might solve this problem. However, given that some /var/ files are ramdisk'ed, I am sure there is a way to ramdisk my files as well.
Any helpl greatly appreciated.
Ace
-
Senior Member
registered user
According to my research, the ramdisk symlinks are created & controlled by the linuxrc script that is contained in the minirt24.gz file. See this post http://www.knoppix.net/forum/viewtopic.php?p=78447 and this post http://www.knoppix.net/forum/viewtopic.php?t=17509 where I dscuss the linuxrc file.
-
Senior Member
registered user
Try as root
rm -rf /var/lib/mysql
cp -rp /KNOPPIX/var/lib/mysql /var/lib
mysqld_safe &
once you have booted into your remastered knoppix CD
If this works you might like to look at this page
http://truth.positive-internet.com/~...0412intro.html
for some further ideas.
-
Originally Posted by
markpreston
Try as root
rm -rf /var/lib/mysql
cp -rp /KNOPPIX/var/lib/mysql /var/lib
mysqld_safe &
once you have booted into your remastered knoppix CD
If this works you might like to look at this page
http://truth.positive-internet.com/~...0412intro.html
for some further ideas.
Problem is, this CD is for the sales guys to pass around at a show.... want to make it as idiot proof as possible. When is KNOPPIX 3.8 out anyway?
-
Senior Member
registered user
From Knoppix 3.7, minirt24.gz, the linuxrc file, starting at line 611, showing how the symlinks are created.
Code:
# We need /bin/mount here for the -o size= option
/bin/mount -t tmpfs -o "size=${RAMSIZE}k" /ramdisk /ramdisk && mkdir -p /ramdisk
/home /ramdisk/var && ln -s /ramdisk/home /ramdisk/var /
echo "${BLUE}Done.${NORMAL}"
else
mkdir -p /home /var
fi
echo -n "${CRE}${BLUE}Creating directories and symlinks on ramdisk...${NORMAL}"
# Create common WRITABLE (empty) dirs
mkdir -p /var/run /var/backups /var/cache/apache /var/local /var/lock/news \
/var/nis /var/preserve /var/state/misc /var/tmp /var/lib \
/var/spool/cups/tmp /var/lib/samba /var/lib/nessus \
/mnt/cdrom /mnt/floppy /mnt/hd /mnt/test \
/home/knoppix /root /etc/sysconfig /etc/X11 /etc/cups /etc/dhcpc
chown knoppix.knoppix /home/knoppix
As for WHY the remaster links to /KNOPPIX, it is either in the linuxrc script or in the remastering scripts.
This is about as much I can help you.
James
-
I see the minirt24.gz file in my /mnt/hda1/knx/[b]master/boot/isolinux/ directory. However, when I gunzip it, I get a huge binary file. How did you extract the text file? Is this the file I should modify to change how the links are created? And if so, do I just modify and then gzip it back, before I remaster?
Thanx
Originally Posted by
UnderScore
From Knoppix 3.7, minirt24.gz, the linuxrc file, starting at line 611, showing how the symlinks are created.
Code:
# We need /bin/mount here for the -o size= option
/bin/mount -t tmpfs -o "size=${RAMSIZE}k" /ramdisk /ramdisk && mkdir -p /ramdisk
/home /ramdisk/var && ln -s /ramdisk/home /ramdisk/var /
echo "${BLUE}Done.${NORMAL}"
else
mkdir -p /home /var
fi
echo -n "${CRE}${BLUE}Creating directories and symlinks on ramdisk...${NORMAL}"
# Create common WRITABLE (empty) dirs
mkdir -p /var/run /var/backups /var/cache/apache /var/local /var/lock/news \
/var/nis /var/preserve /var/state/misc /var/tmp /var/lib \
/var/spool/cups/tmp /var/lib/samba /var/lib/nessus \
/mnt/cdrom /mnt/floppy /mnt/hd /mnt/test \
/home/knoppix /root /etc/sysconfig /etc/X11 /etc/cups /etc/dhcpc
chown knoppix.knoppix /home/knoppix
As for WHY the remaster links to /KNOPPIX, it is either in the linuxrc script or in the remastering scripts.
This is about as much I can help you.
James
-
Senior Member
registered user
> How did you extract the text file?
See the second link in my first post above. In that thread i detail how to get access to the linuxrc file. I am not copying & pasting it because you should be able to read & find it.
> Is this the file I should modify to change how the links are created?
Yes I think it is. I do not know for sure as I am not a Knoppix developer.
> And if so, do I just modify and then gzip it back, before I remaster?
Yes. Again I believe it to be correct but I do not know for sure.
-
Senior Member
registered user
You might like to consider placing an icon on the KDE Desktop for users to click and automate the commands.
This link should help, if you decide to do this:
http://www.knoppix.net/forum/viewtopic.php?t=17445
I have found the following scripts work for start-up and saving and
restoring from a USB device. Naturally I'd be very interested in any more efficient alternative solutions.
For start-up LAMP KDE Desktop icon:
sudo /KNOPPIX/usr/local/bin/startLAMP
in /etc/skel/Desktop
and
#!/bin/bash
# Start Apache and MySQL. Put toophpix database into RAM. Open Mozilla browser.
/etc/init.d/apache start
rm -rf /var/lib/mysql
cp -rp /KNOPPIX/var/lib/mysql /var/lib
mysqld_safe &
mozilla "http://127.0.0.1/Toophpix/page3.php"
goes in /KNOPPIX/usr/local/bin/ directory
I use the same directories for the USB scripts.
For save to USB the commands I am using are:
sudo /usr/local/bin/saveToUSB
and
#!/bin/bash
# Back up toophpix data to USB device.
modprobe usb-storage
mkdir /mnt/usbstore
mount -t vfat /dev/sda1 /mnt/usbstore
mysqldump --opt -u root toophpix > /mnt/usbstore/toophpix.sql
umount /mnt/usbstore
For restore from USB the commands I am using are:
sudo /usr/local/bin/restoreFromUSB
and
#!/bin/bash
# Restore MySQL toophpix database from USB device
modprobe usb-storage
mkdir /mnt/usbstore
mount -t vfat /dev/sda1 /mnt/usbstore
mysql -u root toophpix < /mnt/usbstore/toophpix.sql
umount /mnt/usbstore
The umount commands at the end help ensure that the USB device can be
mounted if the user clicks on the
Desktop icon (Hard-Disk Partition sda1) that appears once Knoppix has
booted up or when the USB device is identified when inserted.
toophpix is the name of the database that is backed up.
-
Senior Member
registered user
Try to add the following to the /etc/skel/init.d/knoppix-autoconfig file of the remastered distro just before starting kdm:
cp -rp /KNOPPIX/var/lib/mysql /var/lib
I am not expert in mysql so I do not know what permissions you should also add to the above. Try it, it should work.
-
Thanx for all who helped. Modifying the minirt file as suggested by UnderScore proved to be the easiest and most efficient. It also allowed me to make all kinds of other tweaks.
I am also going to play around with suggestions from knopx4me as I still need to give the marketing guys the ability to reset some databases after they tip them over "as part of their demo."
Thanx again guys.
Similar Threads
-
By PlatinumPlus in forum Hdd Install / Debian / Apt
Replies: 1
Last Post: 10-06-2005, 10:17 AM
-
By ilovelinux98 in forum Customising & Remastering
Replies: 2
Last Post: 04-25-2005, 08:27 AM
-
By ilovelinux98 in forum MS Windows & New to Linux
Replies: 0
Last Post: 04-23-2005, 09:30 PM
-
By Coume in forum General Support
Replies: 5
Last Post: 08-06-2003, 06:42 AM
-
By antti in forum General Support
Replies: 1
Last Post: 02-10-2003, 02:16 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Cisco SG110 8 Port Gigabit Ethernet Switch SG110D-08-UK
$39.00
Cisco SG110 24 Port Gigabit Ethernet Switch w/ 2 x SFP SG110-24
$117.00
Cisco SG95-16 16-Port Gigabit Switch SG95-16-SG
$47.00
8 Ports Unmanaged Industrial Ethernet Switch Network Gigabit Ethernet Switch
$85.00
New Linksys SE3005 5-port Gigabit Ethernet Switch
$18.99
New 10/100 Mbps 8 Ports Fast Ethernet LAN Desktop RJ45 Network Switch Hub
$11.49
NetGear ProSafe GS748T V4 48-Port Gigabit Smart Switch w/ Ears + Cord
$30.00
Linksys SE3008 8 Ports Rack Mountable Gigabit Ethernet Switch
$21.99
Netgear Prosafe Plus JGS524PE 24 Port Gigabit Switch 12 Port PoE JGS524PE-100NAS
$129.98
Netgear ProSafe S3300-52X-POE+ 48-Port Gigabit PoE+ Stackable Network Switch
$99.99