Sharing only internet connectivity with wireless router
I want the settings in my wireless router to be, ideally: 1) Anonymous have access only to the internet, any packet will be either routed outside of the router or dropped. 2) Authenticated users (by any means) will be able also to access the inner network. Even just achieving 1 for everyone (and drop authentication altogether) is good enough. How can I implement this rules? The easiest solution which came to my mind is: 1) Set known macs to be mapped to IP in 192.168.1.*, unknown macs to be mapped to 192.168.2.* (I think it's possible in many home routers) 2) Somehow tell the router to route all traffic (except the one coming from a PC A) to a PC A. (Not so sure it's possible). 3) In PC A, route all packets to the router, and drop packets whose destination is in 192.168.*, (this should be a simple IPtable rule). Another solution - plug your ears instead of curing your bedmate's snoring. 1) Leave the router as it is, ignore any packets not coming from a known whitelist (can you tell linux to filter packets based on MAC? Even if you can't use IP whitelist and force the known MACs to be mapped to IPs in the whitelist, preventing unknown MACs from being mapped to the whitelist). I of course prefer everything to be done in the router, but I'm not sure it's possible. ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: Sharing only internet connectivity with wireless router
2011/4/6 Elazar Leibovich elaz...@gmail.com I want the settings in my wireless router to be, ideally: 1) Anonymous have access only to the internet, any packet will be either routed outside of the router or dropped. 2) Authenticated users (by any means) will be able also to access the inner network. Even just achieving 1 for everyone (and drop authentication altogether) is good enough. How can I implement this rules? The easiest solution which came to my mind is: 1) Set known macs to be mapped to IP in 192.168.1.*, unknown macs to be mapped to 192.168.2.* (I think it's possible in many home routers) 2) Somehow tell the router to route all traffic (except the one coming from a PC A) to a PC A. (Not so sure it's possible). 3) In PC A, route all packets to the router, and drop packets whose destination is in 192.168.*, (this should be a simple IPtable rule). Another solution - plug your ears instead of curing your bedmate's snoring. 1) Leave the router as it is, ignore any packets not coming from a known whitelist (can you tell linux to filter packets based on MAC? Even if you can't use IP whitelist and force the known MACs to be mapped to IPs in the whitelist, preventing unknown MACs from being mapped to the whitelist). I of course prefer everything to be done in the router, but I'm not sure it's possible. Best solution: Use a router that has a 'guest network' feature. Many do (especially the expensive ones ;)). Some can have it when their firmware is replaced (read: dd-wrt and friends). e.g. http://www.dd-wrt.com/wiki/index.php/VLAN_Detached_Networks_%28Separate_Networks_With_Internet%29 Changing your MAC is pretty trivial... -- Shimi ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: some help in technical solution
On Wednesday, 6 בApril 2011 08:11:24 Omer Zak wrote: Unless I am mistaken, the USB specs stipulate that it shall be possible to connect up to 127 USB devices to a PC. So what you want to do should be doable. However I don't know the chances of it exposing bugs in the Linux USB subsystem, as it is a rare use case. From the rare use cases department... We connected some 20 usb devices to a single PC. Each of these devices sends+receive a minimum of 1K usb packets per second (it's voice + some control messages) The Linux USB stack is a joy to work with and is rock solid (there were some bugs circa 2.6.8 which we never observed since 2.6.12) my 2c. -- Oron Peled Voice: +972-4-8228492 o...@actcom.co.il http://users.actcom.co.il/~oron Windows is NOT a virus: a virus is small and efficient. --Jonathan Leffler, Informix ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: some help in technical solution
I think the best solution would be to use a data acquisition device, either USB or PCI. Measurement computing sell relatively cheap devices, e.g. this USB one for $99: http://www.mccdaq.com/usb-data-acquisition/USB-1024-Series.aspx http://www.mccdaq.com/usb-data-acquisition/USB-1024-Series.aspxcan measure 24 digital channels (you could get two if you need 30). Each competitor could have a small switch, which connects their input line to say a 5V power supply. You can then write a very simple program to detect when each competitor presses their switch (with sub-millisecond accuracy!). These devices apparently have linux support. Jason On Wed, Apr 6, 2011 at 2:44 PM, yosi yarchi yosi.yar...@gmail.com wrote: Hi all I need application that will be able to collect and process inputs from 30 (!) competitors, and will display the results very fast. The ideal solution could be to collect the inputs via SMS: each competitor send his answer, the application collect the answers (related to phone number) and process them. However, I can't assume that the competitors have mobile phones (they may be little childs...). I thought to use 30 USB numerical keyboards as input devices, connected with cables to 3 hubs, connected to the computer. However, I don't have experience with USB drivers at linux... Is it feasible? What should be the main guidelines for the solution? With best regards Yosi Yarchi ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il -- Jason Friedman Postdoctoral scholar Macquarie Centre for Cognitive Science Macquarie University, NSW 2109 Australia email: write.to.ja...@gmail.com web: http://curiousjason.com ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: Sharing only internet connectivity with wireless router
On Wed, Apr 6, 2011 at 10:26 AM, shimi linux...@shimi.net wrote: Changing your MAC is pretty trivial... Yeah, but guessing which MAC is in my whitelist is less so. So if an attacker want to spoof his MAC address he has to sniff for a MAC address, (which means he can do that only when my computer is on). I'm not familiar with the WiFi protocol, but I'm sending the MAC only in the handshake phase it's even harder to spoof your MAC. I'm not trying to avoid the NSA, the attack vector I'm trying to prevent is a random vandals. A vicious attacker can simply knock on my door and ask to use my computer to check when his flight is leaving. ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: Sharing only internet connectivity with wireless router
On Wed, Apr 6, 2011 at 11:17 AM, Elazar Leibovich elaz...@gmail.com wrote: On Wed, Apr 6, 2011 at 10:26 AM, shimi linux...@shimi.net wrote: Changing your MAC is pretty trivial... Yeah, but guessing which MAC is in my whitelist is less so. So if an attacker want to spoof his MAC address he has to sniff for a MAC address, (which means he can do that only when my computer is on). I'm not familiar with the WiFi protocol, but I'm sending the MAC only in the handshake phase it's even harder to spoof your MAC. I'm not trying to avoid the NSA, the attack vector I'm trying to prevent is a random vandals. A vicious attacker can simply knock on my door and ask to use my computer to check when his flight is leaving. You don't need to guess if you can passively get them, courtesy to active network traffic... my computer isn't always on is like putting your head in the sand :) If you want to stop random vandals, just have your network with encryption and don't publish the key. If you open anonymous access... it would be open. If not going VLAN-way, your other choice is to not allow connections coming from the outside at all (to all the computers in your LAN - easy in Linux, difficult if you also have Redmond) - and just run some OpenVPN server on the Linux to have things open (authentication + encryption). -- Shimi ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: Sharing only internet connectivity with wireless router
On Wed, Apr 6, 2011 at 11:25 AM, shimi linux...@shimi.net wrote: If not going VLAN-way, Sorry, don't get me wrong - this is an excellent solution, and just what I was looking for. Any experience with routers in Israel which support dd-wrt firmware (or other opensource firmware which allow vlans)? ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: some help in technical solution
Hi This is interesting idea. However, it support voting between 2 options, only, while I need at least 4 options. I thought that combination of analog DAQ and 4 push buttons with analog output may help here. Does someone have an idea about such combination (analog DAQ+edge unit)? With best regards Yosi Yarchi On 04/06/2011 10:55 AM, Jason Friedman wrote: I think the best solution would be to use a data acquisition device, either USB or PCI. Measurement computing sell relatively cheap devices, e.g. this USB one for $99: http://www.mccdaq.com/usb-data-acquisition/USB-1024-Series.aspx can measure 24 digital channels (you could get two if you need 30). Each "competitor" could have a small switch, which connects their input line to say a 5V power supply. You can then write a very simple program to detect when each competitor presses their switch (with sub-millisecond accuracy!). These devices apparently have linux support. Jason On Wed, Apr 6, 2011 at 2:44 PM, yosi yarchi yosi.yar...@gmail.com wrote: Hi all I need application that will be able to collect and process inputs from 30 (!) competitors, and will display the results very fast. The ideal solution could be to collect the inputs via SMS: each competitor send his answer, the application collect the answers (related to phone number) and process them. However, I can't assume that the competitors have mobile phones (they may be little childs...). I thought to use 30 USB numerical keyboards as input devices, connected with cables to 3 hubs, connected to the computer. However, I don't have experience with USB drivers at linux... Is it feasible? What should be the main guidelines for the solution? With best regards Yosi Yarchi ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il -- Jason Friedman Postdoctoral scholar Macquarie Centre for Cognitive Science Macquarie University, NSW 2109 Australia email: write.to.ja...@gmail.com web: http://curiousjason.com ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: some help in technical solution
I think that analog DAQ with 30 channels would be an overkill for such an application. If you need to give each competitor 4 options, why not choose between one of the following options: 1. 120 digital channels (5 digital DAQ modules at 24 channels each) and provide each competitor with 4 channels, each one connected to its own pushbutton. 2. If you prefer to build 30 4-2 encoders, each getting inputs from 4 pushbuttons and providing 2 digital outputs, then you'll need only 60 digital channels (3 digital DAQ modules, with 12 digital channels to spare). Of course, the final choice involves price tradeoff between: - Analog DAQ with 30 channels + 4-pushbutton with resistors module - Digital DAQ with 120 channels + simple 4-pushbutton module - Digital DAQ with 60 channels + 4-pushbutton with encoder module I assume that data processing speed is not a limiting factor. --- Omer On Wed, 2011-04-06 at 15:54 +0300, yosi yarchi wrote: Hi This is interesting idea. However, it support voting between 2 options, only, while I need at least 4 options. I thought that combination of analog DAQ and 4 push buttons with analog output may help here. Does someone have an idea about such combination (analog DAQ+edge unit)? With best regards Yosi Yarchi On 04/06/2011 10:55 AM, Jason Friedman wrote: I think the best solution would be to use a data acquisition device, either USB or PCI. Measurement computing sell relatively cheap devices, e.g. this USB one for $99: http://www.mccdaq.com/usb-data-acquisition/USB-1024-Series.aspx can measure 24 digital channels (you could get two if you need 30). Each competitor could have a small switch, which connects their input line to say a 5V power supply. You can then write a very simple program to detect when each competitor presses their switch (with sub-millisecond accuracy!). These devices apparently have linux support. Jason On Wed, Apr 6, 2011 at 2:44 PM, yosi yarchi yosi.yar...@gmail.com wrote: Hi all I need application that will be able to collect and process inputs from 30 (!) competitors, and will display the results very fast. The ideal solution could be to collect the inputs via SMS: each competitor send his answer, the application collect the answers (related to phone number) and process them. However, I can't assume that the competitors have mobile phones (they may be little childs...). I thought to use 30 USB numerical keyboards as input devices, connected with cables to 3 hubs, connected to the computer. However, I don't have experience with USB drivers at linux... Is it feasible? What should be the main guidelines for the solution? -- In civilized societies, captions are as important in movies as soundtracks, professional photography and expert editing. My own blog is at http://www.zak.co.il/tddpirate/ My opinions, as expressed in this E-mail message, are mine alone. They do not represent the official policy of any organization with which I may be affiliated in any way. WARNING TO SPAMMERS: at http://www.zak.co.il/spamwarning.html ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: Creating a User with Access to a Single Command
Quoting Ohad Levy, from the post of Tue, 05 Apr: /etc/passwd: ariel:x:uid:gid::/home/ariel:/bin/rbash ls -l /bin/rbash lrwxrwxrwx 1 root root 4 Apr 10 2006 /bin/rbash - bash maybe I'm missing something.. but what would if the user simply type /usr/bin/something else? man rbash -- Fourth branch of government Ira Abramov http://ira.abramov.org/email/ ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: some help in technical solution
I think any analog DAQ based solution will be expensive. Use too many analog levels, and it will not be accurate. Use a small number of levels, and the price per port for analog connection will drive the price too high. You can try using computer mice. cheap 2 button+scroll wheel starts at 17NIS on zap. Such a mouse can provide at least 5 events: right button left button middle button (scroll wheel press) scroll up scroll down You can then take apart the mouse and repackage it, maybe replacing the wheel with 3 distinct switches. Ofcourse you might need powered hubs if you intend to drive 30 mice. You could try taking eight 4 port unpowered hubs (also starts at 17 NIS on zap), and if you computer has 8 free USB ports (many do these days), you could fit 30 mice, and hope that each port can drive 4 mice + hub. You will also have 2 spare ports (8*4-30)for the console keyboard/mouse. Another direction would be to use an arduino board. http://www.seeedstudio.com/depot/microcontrollers-arduino-compatible-c-132_133.html The cheapest $19 board has 14 digital inputs plus 6 analog ones which you can treat as digital if you like. 20 input pins can serve 5 users (4 input pins/user) or 6 users (3 input pins per user if you wire them smartly - 1 qualifier signal that is grounded by all 4 switches, and 2 more that are getting a 2-bit binary code. seeedstudio has free worldwide shipping for orders above $50. Udi 2011/4/6 yosi yarchi yosi.yar...@gmail.com Hi This is interesting idea. However, it support voting between 2 options, only, while I need at least 4 options. I thought that combination of analog DAQ and 4 push buttons with analog output may help here. Does someone have an idea about such combination (analog DAQ+edge unit)? With best regards Yosi Yarchi On 04/06/2011 10:55 AM, Jason Friedman wrote: I think the best solution would be to use a data acquisition device, either USB or PCI. Measurement computing sell relatively cheap devices, e.g. this USB one for $99: http://www.mccdaq.com/usb-data-acquisition/USB-1024-Series.aspx can measure 24 digital channels (you could get two if you need 30). Each competitor could have a small switch, which connects their input line to say a 5V power supply. You can then write a very simple program to detect when each competitor presses their switch (with sub-millisecond accuracy!). These devices apparently have linux support. Jason On Wed, Apr 6, 2011 at 2:44 PM, yosi yarchi yosi.yar...@gmail.com wrote: Hi all I need application that will be able to collect and process inputs from 30 (!) competitors, and will display the results very fast. The ideal solution could be to collect the inputs via SMS: each competitor send his answer, the application collect the answers (related to phone number) and process them. However, I can't assume that the competitors have mobile phones (they may be little childs...). I thought to use 30 USB numerical keyboards as input devices, connected with cables to 3 hubs, connected to the computer. However, I don't have experience with USB drivers at linux... Is it feasible? What should be the main guidelines for the solution? With best regards Yosi Yarchi ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il -- Jason Friedman Postdoctoral scholar Macquarie Centre for Cognitive Science Macquarie University, NSW 2109 Australia email: write.to.ja...@gmail.com web: http://curiousjason.com ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: some help in technical solution
Hi Regarding the solution of mouse or numeric keypad (with USB hubs), I have no clear idea about the technical obstacles. I think that main ones are: (1) bypass X system, and direct the events from particular sources (those mouses or numeric keyboards) to my app. (2) process the events by myself, with knowledge about the source device (the particular mouse or numeric keyboard). Have you any ideas regarding available support in linux for (1) and (2)? With best regards Yosi Yarchi On 04/06/2011 05:08 PM, Udi Finkelstein wrote: I think any analog DAQ based solution will be expensive. Use too many analog levels, and it will not be accurate. Use a small number of levels, and the price per port for analog connection will drive the price too high. You can try using computer mice. cheap 2 button+scroll wheel starts at 17NIS on zap. Such a mouse can provide at least 5 events: right button left button middle button (scroll wheel press) scroll up scroll down You can then take apart the mouse and repackage it, maybe replacing the wheel with 3 distinct switches. Ofcourse you might need powered hubs if you intend to drive 30 mice. You could try taking eight 4 port unpowered hubs (also starts at 17 NIS on zap), and if you computer has 8 free USB ports (many do these days), you could fit 30 mice, and hope that each port can drive 4 mice + hub. You will also have 2 spare ports (8*4-30)for the console keyboard/mouse. Another direction would be to use an arduino board. http://www.seeedstudio.com/depot/microcontrollers-arduino-compatible-c-132_133.html The cheapest $19 board has 14 digital inputs plus 6 analog ones which you can treat as digital if you like. 20 input pins can serve 5 users (4 input pins/user) or 6 users (3 input pins per user if you wire them smartly - 1 qualifier signal that is grounded by all 4 switches, and 2 more that are getting a 2-bit binary code. seeedstudio has free worldwide shipping for orders above $50. Udi 2011/4/6 yosi yarchi yosi.yar...@gmail.com Hi This is interesting idea. However, it support voting between 2 options, only, while I need at least 4 options. I thought that combination of analog DAQ and 4 push buttons with analog output may help here. Does someone have an idea about such combination (analog DAQ+edge unit)? With best regards Yosi Yarchi On 04/06/2011 10:55 AM, Jason Friedman wrote: I think the best solution would be to use a data acquisition device, either USB or PCI. Measurement computing sell relatively cheap devices, e.g. this USB one for $99: http://www.mccdaq.com/usb-data-acquisition/USB-1024-Series.aspx can measure 24 digital channels (you could get two if you need 30). Each "competitor" could have a small switch, which connects their input line to say a 5V power supply. You can then write a very simple program to detect when each competitor presses their switch (with sub-millisecond accuracy!). These devices apparently have linux support. Jason On Wed, Apr 6, 2011 at 2:44 PM, yosi yarchi yosi.yar...@gmail.com wrote: Hi all I need application that will be able to collect and process inputs from 30 (!) competitors, and will display the results very fast. The ideal solution could be to collect the inputs via SMS: each competitor send his answer, the application collect the answers (related to phone number) and process them. However, I can't assume that the competitors have mobile phones (they may be little childs...). I thought to use 30 USB numerical keyboards as input devices, connected with cables to 3 hubs, connected to the computer. However, I don't have experience with USB drivers at linux... Is it feasible? What should be the main guidelines for the solution? With best regards Yosi Yarchi ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il -- Jason Friedman Postdoctoral scholar Macquarie Centre for Cognitive Science Macquarie University, NSW 2109 Australia email: write.to.ja...@gmail.com web: http://curiousjason.com ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: some help in technical solution
I see two possibilities: 1. Connect the mice to a PC in which the X-Server is not activated. If you need to display graphic results, use two networked computers. 2. Use explicit /etc/X11/xorg.conf From reading man xorg.conf: - Disable hotplugging. - SendCoreEvents off for all identified mice except for one. DISCLAIMER: I didn't actually try the above. On Thu, 2011-04-07 at 07:04 +0300, yosi yarchi wrote: Hi Regarding the solution of mouse or numeric keypad (with USB hubs), I have no clear idea about the technical obstacles. I think that main ones are: (1) bypass X system, and direct the events from particular sources (those mouses or numeric keyboards) to my app. (2) process the events by myself, with knowledge about the source device (the particular mouse or numeric keyboard). Have you any ideas regarding available support in linux for (1) and (2)? With best regards Yosi Yarchi On 04/06/2011 05:08 PM, Udi Finkelstein wrote: I think any analog DAQ based solution will be expensive. Use too many analog levels, and it will not be accurate. Use a small number of levels, and the price per port for analog connection will drive the price too high. You can try using computer mice. cheap 2 button+scroll wheel starts at 17NIS on zap. Such a mouse can provide at least 5 events: right button left button middle button (scroll wheel press) scroll up scroll down You can then take apart the mouse and repackage it, maybe replacing the wheel with 3 distinct switches. Ofcourse you might need powered hubs if you intend to drive 30 mice. You could try taking eight 4 port unpowered hubs (also starts at 17 NIS on zap), and if you computer has 8 free USB ports (many do these days), you could fit 30 mice, and hope that each port can drive 4 mice + hub. You will also have 2 spare ports (8*4-30)for the console keyboard/mouse. Another direction would be to use an arduino board. http://www.seeedstudio.com/depot/microcontrollers-arduino-compatible-c-132_133.html The cheapest $19 board has 14 digital inputs plus 6 analog ones which you can treat as digital if you like. 20 input pins can serve 5 users (4 input pins/user) or 6 users (3 input pins per user if you wire them smartly - 1 qualifier signal that is grounded by all 4 switches, and 2 more that are getting a 2-bit binary code. seeedstudio has free worldwide shipping for orders above $50. Udi 2011/4/6 yosi yarchi yosi.yar...@gmail.com Hi This is interesting idea. However, it support voting between 2 options, only, while I need at least 4 options. I thought that combination of analog DAQ and 4 push buttons with analog output may help here. Does someone have an idea about such combination (analog DAQ +edge unit)? With best regards Yosi Yarchi On 04/06/2011 10:55 AM, Jason Friedman wrote: I think the best solution would be to use a data acquisition device, either USB or PCI. Measurement computing sell relatively cheap devices, e.g. this USB one for $99: http://www.mccdaq.com/usb-data-acquisition/USB-1024-Series.aspx can measure 24 digital channels (you could get two if you need 30). Each competitor could have a small switch, which connects their input line to say a 5V power supply. You can then write a very simple program to detect when each competitor presses their switch (with sub-millisecond accuracy!). These devices apparently have linux support. Jason On Wed, Apr 6, 2011 at 2:44 PM, yosi yarchi yosi.yar...@gmail.com wrote: Hi all I need application that will be able to collect and process inputs from 30 (!) competitors, and will display the results very fast. The ideal solution could be to collect the inputs via SMS: each competitor send his answer, the application collect the answers (related to phone number) and process them. However, I can't assume that the competitors have mobile phones (they may be little childs...). I thought to use 30 USB numerical keyboards as input devices, connected with cables to 3 hubs, connected to the computer. However, I don't have experience with USB drivers
Re: auto-maximize a logical partition with ext3
If I understand your question then you want to treat a disk image stored inside a none-disk (e.g. a Logical Volume or even a regular file) as a physical disk and access the partition inside it. In that case kaprtx is your friend, something like: losetup -f /dev/vgname/lvname kpartx -a -v /dev/loopN now you can access the partitions inside it (e.g. vgchange -ay internal-vgname, mount, resizefs etc) to reverse: umount/vgchange -an/... losetup -a # to find which loop device you need to deactivate kpartx -d /dev/loopN losetup -d /dev/loopN Did I get it? --Amos On 3 April 2011 03:43, Ira Abramov lists-linux...@ira.abramov.org wrote: Hello friends, last resort before I go and reinvent the wheel, badly. I have a system here that creates a dozen images for medias of different sizes, installing a few dozen machines every day. I would like to make the process more unified - install the same 4G image on all medias (dd) and then maximize sda6, the last ext3 partition, and naturally, the underlying extended partition sda4. The only tool that automates resizing like that is parted, and it still needs a precise partition length instead of use all available space, and won't resize ext3 if I don't turn off the journaling first (make it ext2). I tried deducing the maximum partition size with fdisk -l and other sfdisk instead, but each uses different units and I have no idea how to convert them all correctly so I'm left with working, non overlapping partitions. I'm prepared to do it the hard way, I just wondered if there's a tool I missed or an existing script that already does this. Thanks. -- His own worst enemy Ira Abramov http://ira.abramov.org/email/ ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Re: auto-maximize a logical partition with ext3
Ah and btw - sfdisk is king when it comes to scripting fdisk. Just pay attention that if you delete/create partitions to resize them that it will use the same beginning sector as whatever already exists on the image (e.g. best way is to just use sfdisk to create the original image). On 3 April 2011 03:43, Ira Abramov lists-linux...@ira.abramov.org wrote: Hello friends, last resort before I go and reinvent the wheel, badly. I have a system here that creates a dozen images for medias of different sizes, installing a few dozen machines every day. I would like to make the process more unified - install the same 4G image on all medias (dd) and then maximize sda6, the last ext3 partition, and naturally, the underlying extended partition sda4. The only tool that automates resizing like that is parted, and it still needs a precise partition length instead of use all available space, and won't resize ext3 if I don't turn off the journaling first (make it ext2). I tried deducing the maximum partition size with fdisk -l and other sfdisk instead, but each uses different units and I have no idea how to convert them all correctly so I'm left with working, non overlapping partitions. I'm prepared to do it the hard way, I just wondered if there's a tool I missed or an existing script that already does this. Thanks. -- His own worst enemy Ira Abramov http://ira.abramov.org/email/ ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il